You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`String_Contains` returns a value indicating whether a specified substring occurs within this string.
4
+
5
+
```csharp
6
+
String_Contains (
7
+
@sourceNVARCHAR (MAX),
8
+
@targetNVARCHAR (MAX)
9
+
)
10
+
RETURNSBIT
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
+
SELECTSQLNET::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
+
@sourceNVARCHAR (4000),
35
+
@targetNVARCHAR (4000)
36
+
)
37
+
RETURNSBIT
38
+
```
39
+
40
+
## Example
41
+
42
+
```csharp
43
+
SELECTSQLNET::String_Contains4k('This is a string.', 'string')
`String_EndsWith` determines whether the end of the source string instance matches a target string.
4
+
5
+
```csharp
6
+
String_EndsWith (
7
+
@sourceNVARCHAR (MAX),
8
+
@targetNVARCHAR (MAX)
9
+
)
10
+
RETURNSBIT
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
+
SELECTSQLNET::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
+
@sourceNVARCHAR (4000),
35
+
@targetNVARCHAR (4000)
36
+
)
37
+
RETURNSBIT
38
+
```
39
+
40
+
## Example
41
+
42
+
```csharp
43
+
SELECTSQLNET::String_EndsWith4k('This is a string.', 'string.')
0 commit comments