Skip to content

Commit d8c4a6d

Browse files
committed
Added String IndexOf articles
1 parent 6f33eef commit d8c4a6d

8 files changed

Lines changed: 329 additions & 0 deletions
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# String_IndexOfCurrentCultureIgnoreCase
2+
3+
`String_IndexOfCurrentCultureIgnoreCase` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string using culture-sensitive sort rules, the current culture, and ignoring the case of the strings.
4+
5+
```csharp
6+
String_IndexOfCurrentCultureIgnoreCase (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOfCurrentCultureIgnoreCase('This is a string.', 'string')
26+
SELECT SQLNET::String_IndexOfCurrentCultureIgnoreCase('Archæology', 'Æ')
27+
```
28+
29+
# String_IndexOfCurrentCultureIgnoreCase4k
30+
31+
It is equivalent to `String_IndexOfCurrentCultureIgnoreCase` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
32+
33+
```csharp
34+
String_IndexOfCurrentCultureIgnoreCase4k (
35+
@source NVARCHAR (4000),
36+
@searchValue NVARCHAR (4000)
37+
)
38+
RETURNS INT
39+
```
40+
41+
## Example
42+
43+
```csharp
44+
SELECT SQLNET::String_IndexOfCurrentCultureIgnoreCase4k('This is a string.', 'string')
45+
SELECT SQLNET::String_IndexOfCurrentCultureIgnoreCase4k('Archæology', 'Æ')
46+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# String_IndexOfCurrentCulture
2+
3+
`String_IndexOfCurrentCulture` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string using culture-sensitive sort rules and the current culture.
4+
5+
```csharp
6+
String_IndexOfCurrentCulture (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOfCurrentCulture('This is a string.', 'string')
26+
SELECT SQLNET::String_IndexOfCurrentCulture('Archæology', 'Æ')
27+
```
28+
29+
# String_IndexOfCurrentCulture4k
30+
31+
It is equivalent to `String_IndexOfCurrentCulture` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
32+
33+
```csharp
34+
String_IndexOfCurrentCulture4k (
35+
@source NVARCHAR (4000),
36+
@searchValue NVARCHAR (4000)
37+
)
38+
RETURNS INT
39+
```
40+
41+
## Example
42+
43+
```csharp
44+
SELECT SQLNET::String_IndexOfCurrentCulture4k('This is a string.', 'string')
45+
SELECT SQLNET::String_IndexOfCurrentCulture4k('Archæology', 'Æ')
46+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# String_IndexOfInvariantCultureIgnoreCase
2+
3+
`String_IndexOfInvariantCultureIgnoreCase` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings.
4+
5+
```csharp
6+
String_IndexOfInvariantCultureIgnoreCase (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOfInvariantCultureIgnoreCase('This is a string.', 'string')
26+
SELECT SQLNET::String_IndexOfInvariantCultureIgnoreCase('Archæology', 'Æ')
27+
```
28+
29+
# String_IndexOfInvariantCultureIgnoreCase4k
30+
31+
It is equivalent to `String_IndexOfInvariantCultureIgnoreCase` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
32+
33+
```csharp
34+
String_IndexOfInvariantCultureIgnoreCase4k (
35+
@source NVARCHAR (4000),
36+
@searchValue NVARCHAR (4000)
37+
)
38+
RETURNS INT
39+
```
40+
41+
## Example
42+
43+
```csharp
44+
SELECT SQLNET::String_IndexOfInvariantCultureIgnoreCase4k('This is a string.', 'string')
45+
SELECT SQLNET::String_IndexOfInvariantCultureIgnoreCase4k('Archæology', 'Æ')
46+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# String_IndexOfInvariantCulture
2+
3+
`String_IndexOfInvariantCulture` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string using culture-sensitive sort rules and the invariant culture.
4+
5+
```csharp
6+
String_IndexOfInvariantCulture (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOfInvariantCulture('This is a string.', 'string')
26+
SELECT SQLNET::String_IndexOfInvariantCulture('Archæology', 'Æ')
27+
```
28+
29+
# String_IndexOfInvariantCulture4k
30+
31+
It is equivalent to `String_IndexOfInvariantCulture` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
32+
33+
```csharp
34+
String_IndexOfInvariantCulture4k (
35+
@source NVARCHAR (4000),
36+
@searchValue NVARCHAR (4000)
37+
)
38+
RETURNS INT
39+
```
40+
41+
## Example
42+
43+
```csharp
44+
SELECT SQLNET::String_IndexOfInvariantCulture4k('This is a string.', 'string')
45+
SELECT SQLNET::String_IndexOfInvariantCulture4k('Archæology', 'Æ')
46+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# String_IndexOfOrdinalIgnoreCase
2+
3+
`String_IndexOfOrdinalIgnoreCase` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string using ordinal (binary) sort rules and ignoring the case of the strings.
4+
5+
```csharp
6+
String_IndexOfOrdinalIgnoreCase (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOfOrdinalIgnoreCase('This is a string.', 'string')
26+
SELECT SQLNET::String_IndexOfOrdinalIgnoreCase('Archæology', 'Æ')
27+
```
28+
29+
# String_IndexOfOrdinalIgnoreCase4k
30+
31+
It is equivalent to `String_IndexOfOrdinalIgnoreCase` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
32+
33+
```csharp
34+
String_IndexOfOrdinalIgnoreCase4k (
35+
@source NVARCHAR (4000),
36+
@searchValue NVARCHAR (4000)
37+
)
38+
RETURNS INT
39+
```
40+
41+
## Example
42+
43+
```csharp
44+
SELECT SQLNET::String_IndexOfOrdinalIgnoreCase4k('This is a string.', 'string')
45+
SELECT SQLNET::String_IndexOfOrdinalIgnoreCase4k('Archæology', 'Æ')
46+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# String_IndexOfOrdinal
2+
3+
`String_IndexOfOrdinal` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string using ordinal (binary) sort rules.
4+
5+
```csharp
6+
String_IndexOfOrdinal (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOfOrdinal('This is a string.', 'string')
26+
SELECT SQLNET::String_IndexOfOrdinal('Archæology', 'Æ')
27+
```
28+
29+
# String_IndexOfOrdinal4k
30+
31+
It is equivalent to `String_IndexOfOrdinal` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
32+
33+
```csharp
34+
String_IndexOfOrdinal4k (
35+
@source NVARCHAR (4000),
36+
@searchValue NVARCHAR (4000)
37+
)
38+
RETURNS INT
39+
```
40+
41+
## Example
42+
43+
```csharp
44+
SELECT SQLNET::String_IndexOfOrdinal4k('This is a string.', 'string')
45+
SELECT SQLNET::String_IndexOfOrdinal4k('Archæology', 'Æ')
46+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# String_IndexOf
2+
3+
`String_IndexOf` returns the zero-based index of the first occurrence of a `searchValue` Unicode character or string within the `source` string.
4+
5+
```csharp
6+
String_IndexOf (
7+
@source NVARCHAR (MAX),
8+
@searchValue NVARCHAR (MAX)
9+
)
10+
RETURNS INT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **searchValue**: The string to search within the source string.
17+
18+
## Returns
19+
20+
The zero-based index position of the `searchValue` parameter from the start of the `source` string if that string is found, or -1 if it is not. If `searchValue` is Empty, the return value is 0.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_IndexOf('This is a string.', 'string')
26+
```
27+
28+
# String_IndexOf4k
29+
30+
It is equivalent to `String_IndexOf` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
31+
32+
```csharp
33+
String_IndexOf4k (
34+
@source NVARCHAR (4000),
35+
@searchValue NVARCHAR (4000)
36+
)
37+
RETURNS INT
38+
```
39+
40+
## Example
41+
42+
```csharp
43+
SELECT SQLNET::String_IndexOf4k('This is a string.', 'string')
44+
```

docs2/pages/documentations/string/string.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ Represents text as a sequence of UTF-16 code units.
1313
| [String_CompareInvariantCultureIgnoreCase(strA, strB)](/string-compare-invariant-culture-ignore-case) | Compares two specified String objects using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings. | [Try it]()|
1414
| [String_CompareOrdinal(strA, strB)](/string-compare-ordinal) | Compares two specified String objects using ordinal (binary) sort rules. | [Try it]()|
1515
| [String_CompareOrdinalIgnoreCase(strA, strB)](/string-compare-ordinal-ignore-case) | Compares two specified String objects using ordinal (binary) sort rules, and ignoring the case of the strings. | [Try it]()|
16+
| [String_Contains(source, target)](/string-contains) | Returns a value indicating whether a specified substring occurs within this string. | [Try it]()|
17+
| [String_EndsWith(source, target)](/string-endswith) | Determines whether the end of the source string instance matches a target string. | [Try it]()|
18+
| [String_IndexOf(source, searchValue)](/string-indexof) | Returns the zero-based index of the first occurrence of the specified string. | [Try it]()|
19+
| [String_IndexOfCurrentCulture(source, searchValue)](/string-indexof-current-culture) | Returns the zero-based index of the first occurrence of the specified string using culture-sensitive sort rules and the current culture. | [Try it]()|
20+
| [String_IndexOfCurrentCultureIgnoreCase(source, searchValue)](/string-indexof-current-culture-ignore-case) | Returns the zero-based index of the first occurrence of the specified string using culture-sensitive sort rules, the current culture, and ignoring the case of the strings. | [Try it]()|
21+
| [String_IndexOfInvariantCulture(source, searchValue)](/string-indexof-invariant-culture) | Returns the zero-based index of the first occurrence of the specified string using culture-sensitive sort rules and the invariant culture. | [Try it]()|
22+
| [String_IndexOfInvariantCultureIgnoreCase(source, searchValue)](/string-indexof-invariant-culture-ignore-case) | Returns the zero-based index of the first occurrence of the specified string using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings. | [Try it]()|
23+
| [String_IndexOfOrdinal(source, searchValue)](/string-indexof-ordinal) | Returns the zero-based index of the first occurrence of the specified string using ordinal (binary) sort rules. | [Try it]()|
24+
| [String_IndexOfOrdinalIgnoreCase(source, searchValue)](/string-indexof-ordinal-ignore-case) | Returns the zero-based index of the first occurrence of the specified string using ordinal (binary) sort rules, and ignoring the case of the strings. | [Try it]()|

0 commit comments

Comments
 (0)