Skip to content

Commit 6f33eef

Browse files
committed
Added string contains article
1 parent 0245391 commit 6f33eef

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# String_Contains
2+
3+
`String_Contains` returns a value indicating whether a specified substring occurs within this string.
4+
5+
```csharp
6+
String_Contains (
7+
@source NVARCHAR (MAX),
8+
@target NVARCHAR (MAX)
9+
)
10+
RETURNS BIT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **target**: The string to search within source string.
17+
18+
## Returns
19+
20+
`true` if the target parameter occurs within the source string, or if target is the empty string (""); otherwise, `false`.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_Contains('This is a string.', 'string')
26+
```
27+
28+
# String_Contains4k
29+
30+
It is equivalent to `String_Contains` 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_Contains4k (
34+
@source NVARCHAR (4000),
35+
@target NVARCHAR (4000)
36+
)
37+
RETURNS BIT
38+
```
39+
40+
## Example
41+
42+
```csharp
43+
SELECT SQLNET::String_Contains4k('This is a string.', 'string')
44+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# String_EndsWith
2+
3+
`String_EndsWith` determines whether the end of the source string instance matches a target string.
4+
5+
```csharp
6+
String_EndsWith (
7+
@source NVARCHAR (MAX),
8+
@target NVARCHAR (MAX)
9+
)
10+
RETURNS BIT
11+
```
12+
13+
## Parameters
14+
15+
- **source**: The source string.
16+
- **target**: The string to compare to the substring at the end of the source string.
17+
18+
## Returns
19+
20+
`true` if the target matches the end of the source string; otherwise, `false`.
21+
22+
## Example
23+
24+
```csharp
25+
SELECT SQLNET::String_EndsWith('This is a string.', 'string.')
26+
```
27+
28+
# String_EndsWith4k
29+
30+
It is equivalent to `String_EndsWith` 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_EndsWith4k (
34+
@source NVARCHAR (4000),
35+
@target NVARCHAR (4000)
36+
)
37+
RETURNS BIT
38+
```
39+
40+
## Example
41+
42+
```csharp
43+
SELECT SQLNET::String_EndsWith4k('This is a string.', 'string.')
44+
```

0 commit comments

Comments
 (0)