Skip to content

Commit 60ae52a

Browse files
committed
Added String Length article
1 parent 1f25c83 commit 60ae52a

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# String_Length
2+
3+
`String_Length` returns the number of characters in the `source` string.
4+
5+
```csharp
6+
String_Length (
7+
@source NVARCHAR (MAX),
8+
)
9+
RETURNS INT
10+
```
11+
12+
## Parameters
13+
14+
- **source**: The source string.
15+
16+
## Returns
17+
18+
The number of characters in the `source` string.
19+
20+
## Example
21+
22+
```csharp
23+
SELECT SQLNET::String_Length('This is a string.')
24+
```
25+
26+
# String_Length4k
27+
28+
It is equivalent to `String_Length` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
29+
30+
```csharp
31+
String_Length4k (
32+
@source NVARCHAR (4000),
33+
)
34+
RETURNS INT
35+
```
36+
37+
## Example
38+
39+
```csharp
40+
SELECT SQLNET::String_Length4k('This is a string.')
41+
```

docs2/pages/documentations/string/string.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ Represents text as a sequence of UTF-16 code units.
3030
| [String_LastIndexOfInvariantCultureIgnoreCase(source, searchValue)](/string-last-indexof-invariant-culture-ignore-case) | Returns the zero-based index of the last occurrence of the specified string using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings. | [Try it]()|
3131
| [String_LastIndexOfOrdinal(source, searchValue)](/string-last-indexof-ordinal) | Returns the zero-based index of the last occurrence of the specified string using ordinal (binary) sort rules. | [Try it]()|
3232
| [String_LastIndexOfOrdinalIgnoreCase(source, searchValue)](/string-last-indexof-ordinal-ignore-case) | Returns the zero-based index of the last occurrence of the specified string using ordinal (binary) sort rules, and ignoring the case of the strings. | [Try it]()|
33+
| [String_Leangth(source)](/string-length) | Returns the number of characters in the specified string. | [Try it]()|

0 commit comments

Comments
 (0)