Skip to content

Added documentation articles #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# String_CompareCurrentCultureIgnoreCase

`String_CompareCurrentCultureIgnoreCase` compares two specified String objects using culture-sensitive sort rules, the current culture, and ignoring the case of the strings, and returns an integer that indicates their relative position in the sort order.

```csharp
String_CompareCurrentCultureIgnoreCase (
@strA NVARCHAR (MAX),
@strB NVARCHAR (MAX)
)
RETURNS INT
```

## Parameters

- **strA**: The first string to compare.
- **strB**: The second string to compare.

## Returns

A 32-bit signed integer that indicates the lexical relationship between the two comparands.

| Value | Condition |
|:--------- |:--------- |
|Less than zero |strA precedes strB in the sort order.|
|Zero |strA occurs in the same position as strB in the sort order.|
|Greater than zero |strA follows strB in the sort order.|

## Example

```csharp
SELECT SQLNET::String_CompareCurrentCultureIgnoreCase('case', 'Case')
SELECT SQLNET::String_CompareCurrentCultureIgnoreCase('encyclop�dia', 'encyclopaedia')
```

# String_CompareCurrentCultureIgnoreCase4k

It is equivalent to `String_CompareCurrentCultureIgnoreCase` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.

```csharp
String_CompareCurrentCultureIgnoreCase4k (
@strA NVARCHAR (4000),
@strB NVARCHAR (4000)
)
RETURNS INT
```

## Example

```csharp
SELECT SQLNET::String_CompareCurrentCultureIgnoreCase4k('case', 'Case')
SELECT SQLNET::String_CompareCurrentCultureIgnoreCase4k('encyclop�dia', 'encyclopaedia')
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# String_CompareCurrentCulture

`String_CompareCurrentCulture` compares two specified String objects using culture-sensitive sort rules and the current culture, and returns an integer that indicates their relative position in the sort order.

```csharp
String_CompareCurrentCulture (
@strA NVARCHAR (MAX),
@strB NVARCHAR (MAX)
)
RETURNS INT
```

## Parameters

- **strA**: The first string to compare.
- **strB**: The second string to compare.

## Returns

A 32-bit signed integer that indicates the lexical relationship between the two comparands.

| Value | Condition |
|:--------- |:--------- |
|Less than zero |strA precedes strB in the sort order.|
|Zero |strA occurs in the same position as strB in the sort order.|
|Greater than zero |strA follows strB in the sort order.|

## Example

```csharp
SELECT SQLNET::String_CompareCurrentCulture('case', 'Case')
SELECT SQLNET::String_CompareCurrentCulture('encyclop�dia', 'encyclopaedia')
```

# String_CompareCurrentCulture4k

It is equivalent to `String_CompareCurrentCulture` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.

```csharp
String_CompareCurrentCulture4k (
@strA NVARCHAR (4000),
@strB NVARCHAR (4000)
)
RETURNS INT
```

## Example

```csharp
SELECT SQLNET::String_CompareCurrentCulture4k('case', 'Case')
SELECT SQLNET::String_CompareCurrentCulture4k('encyclop�dia', 'encyclopaedia')
```
52 changes: 52 additions & 0 deletions docs2/pages/documentations/string/string-compare-ignore-case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# String_CompareIgnoreCase

`String_CompareIgnoreCase` compares two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.

```csharp
String_CompareIgnoreCase (
@strA NVARCHAR (MAX),
@strB NVARCHAR (MAX)
)
RETURNS INT
```

## Parameters

- **strA**: The first string to compare.
- **strB**: The second string to compare.

## Returns

A 32-bit signed integer that indicates the lexical relationship between the two comparands.

| Value | Condition |
|:--------- |:--------- |
|Less than zero |strA precedes strB in the sort order.|
|Zero |strA occurs in the same position as strB in the sort order.|
|Greater than zero |strA follows strB in the sort order.|

## Example

```csharp
SELECT SQLNET::String_CompareIgnoreCase('case', 'Case')
SELECT SQLNET::String_CompareIgnoreCase('Arch�ology', 'ARCH�OLOGY')
```

# String_CompareIgnoreCase4k

It is equivalent to `String_CompareIgnoreCase` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.

```csharp
String_CompareIgnoreCase4k (
@strA NVARCHAR (4000),
@strB NVARCHAR (4000)
)
RETURNS INT
```

## Example

```csharp
SELECT SQLNET::String_CompareIgnoreCase4k('case', 'Case')
SELECT SQLNET::String_CompareIgnoreCase4k('Arch�ology', 'ARCH�OLOGY')
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# String_CompareInvariantCulture

`String_CompareInvariantCulture` compares two specified String objects using culture-sensitive sort rules and the invariant culture, and returns an integer that indicates their relative position in the sort order.

```csharp
String_CompareInvariantCulture (
@strA NVARCHAR (MAX),
@strB NVARCHAR (MAX)
)
RETURNS INT
```

## Parameters

- **strA**: The first string to compare.
- **strB**: The second string to compare.

## Returns

A 32-bit signed integer that indicates the lexical relationship between the two comparands.

| Value | Condition |
|:--------- |:--------- |
|Less than zero |strA precedes strB in the sort order.|
|Zero |strA occurs in the same position as strB in the sort order.|
|Greater than zero |strA follows strB in the sort order.|

## Example

```csharp
SELECT SQLNET::String_CompareInvariantCulture('case', 'Case')
SELECT SQLNET::String_CompareInvariantCulture('encyclop�dia', 'encyclopaedia')
```

# String_CompareInvariantCulture4k

It is equivalent to `String_CompareInvariantCulture` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.

```csharp
String_CompareInvariantCulture4k (
@strA NVARCHAR (4000),
@strB NVARCHAR (4000)
)
RETURNS INT
```

## Example

```csharp
SELECT SQLNET::String_CompareInvariantCulture4k('case', 'Case')
SELECT SQLNET::String_CompareInvariantCulture4k('encyclop�dia', 'encyclopaedia')
```
50 changes: 50 additions & 0 deletions docs2/pages/documentations/string/string-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# String_Compare

`String_Compare` compares two specified String objects and returns an integer that indicates their relative position in the sort order.

```csharp
String_Compare (
@strA NVARCHAR (MAX),
@strB NVARCHAR (MAX)
)
RETURNS INT
```

## Parameters

- **strA**: The first string to compare.
- **strB**: The second string to compare.

## Returns

A 32-bit signed integer that indicates the lexical relationship between the two comparands.

| Value | Condition |
|:--------- |:--------- |
|Less than zero |strA precedes strB in the sort order.|
|Zero |strA occurs in the same position as strB in the sort order.|
|Greater than zero |strA follows strB in the sort order.|

## Example

```csharp
SELECT SQLNET::String_Compare('abc', 'abc')
```

# String_Compare4k

It is equivalent to `String_Compare` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.

```csharp
String_Compare4k (
@strA NVARCHAR (4000),
@strB NVARCHAR (4000)
)
RETURNS INT
```

## Example

```csharp
SELECT SQLNET::String_Compare4k('abc', 'abc')
```
12 changes: 12 additions & 0 deletions docs2/pages/documentations/string/string.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# String

Represents text as a sequence of UTF-16 code units.


| Name | Description | Example |
| :--- | :---------- | :------ |
| [String_Compare](/string-compare) | Compares two specified String objects. | [Try it]()|
| [String_CompareCurrentCulture](/string-compare-current-culture) | Compares two specified String objects using culture-sensitive sort rules and the current culture. | [Try it]()|
| [String_CompareCurrentCultureIgnoreCase](/string-compare-current-culture-ignore-case) | Compares two specified String objects using culture-sensitive sort rules, the current culture, and ignoring the case of the strings. | [Try it]()|
| [String_CompareIgnoreCase](/string-compare-ignore-case) | Compares two specified String objects ignoring their case. | [Try it]()|
| [String_CompareInvariantCulture](/string-compare-invariant-culture) | Compares two specified String objects using culture-sensitive sort rules and the invariant culture. | [Try it]()|