@@ -8368,6 +8368,7 @@ The <xref:System.Runtime.CompilerServices.CompilationRelaxations.NoStringInterni
8368
8368
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.string.isnullorempty/cpp/isnullorempty1.cpp" id="Snippet1":::
8369
8369
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/isnullorempty1.cs" interactive="try-dotnet-method" id="Snippet1":::
8370
8370
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.string.isnullorempty/vb/isnullorempty1.vb" id="Snippet1":::
8371
+ :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/isnullorempty1.fs" interactive="try-dotnet-method" id="Snippet1":::
8371
8372
8372
8373
You can use the <xref:System.String.IsNullOrWhiteSpace%2A> method to test whether a string is `null`, its value is <xref:System.String.Empty?displayProperty=nameWithType>, or it consists only of white-space characters.
8373
8374
@@ -8378,6 +8379,7 @@ A string is `null` if it has not been assigned a value (in C++ and Visual Basic)
8378
8379
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.string.isnullorempty/cpp/NullString1.cpp" id="Snippet2":::
8379
8380
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/NullString1.cs" interactive="try-dotnet-method" id="Snippet2":::
8380
8381
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.string.isnullorempty/vb/NullString1.vb" id="Snippet2":::
8382
+ :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/NullString1.fs" interactive="try-dotnet-method" id="Snippet2":::
8381
8383
8382
8384
## What is an empty string?
8383
8385
@@ -8386,13 +8388,15 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
8386
8388
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.string.isnullorempty/cpp/NullString1.cpp" id="Snippet3":::
8387
8389
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/NullString1.cs" interactive="try-dotnet-method" id="Snippet3":::
8388
8390
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.string.isnullorempty/vb/NullString1.vb" id="Snippet3":::
8391
+ :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/NullString2.fs" interactive="try-dotnet-method" id="Snippet3":::
8389
8392
8390
8393
## Examples
8391
8394
The following example examines three strings and determines whether each string has a value, is an empty string, or is `null`.
8392
8395
8393
8396
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/string.isNullOrEmpty/CPP/inoe.cpp" id="Snippet1":::
8394
8397
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/inoe.cs" interactive="try-dotnet-method" id="Snippet1":::
8395
8398
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/string.isNullOrEmpty/VB/inoe.vb" id="Snippet1":::
8399
+ :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/inoe.fs" interactive="try-dotnet-method" id="Snippet1":::
8396
8400
8397
8401
]]></format>
8398
8402
</remarks>
@@ -11383,16 +11387,16 @@ This method searches for all newline sequences within the string and canonicaliz
11383
11387
occurrences of non-Windows newline sequences will be replaced with the sequence CRLF. When
11384
11388
running on Unix, all occurrences of non-Unix newline sequences will be replaced with
11385
11389
a single LF character.
11386
-
11390
+
11387
11391
It is not recommended that protocol parsers utilize this API. Protocol specifications often
11388
11392
mandate specific newline sequences. For example, HTTP/1.1 (RFC 8615) mandates that the request
11389
11393
line, status line, and headers lines end with CRLF. Since this API operates over a wide range
11390
11394
of newline sequences, a protocol parser utilizing this API could exhibit behaviors unintended
11391
11395
by the protocol's authors.
11392
-
11396
+
11393
11397
This overload is equivalent to calling <xref:System.String.ReplaceLineEndings(System.String)>, passing
11394
11398
<xref:System.Environment.NewLine> as the <em>replacementText</em> parameter.
11395
-
11399
+
11396
11400
This method is guaranteed O(n) complexity, where <em>n</em> is the length of the input string.
11397
11401
11398
11402
]]></format>
@@ -11435,17 +11439,17 @@ This method searches for all newline sequences within the string and canonicaliz
11435
11439
This method searches for all newline sequences within the string and canonicalizes them to the
11436
11440
newline sequence provided by `replacementText`. If `replacementText`
11437
11441
is <xref:System.String.Empty>, all newline sequences within the string will be removed.
11438
-
11442
+
11439
11443
It is not recommended that protocol parsers utilize this API. Protocol specifications often
11440
11444
mandate specific newline sequences. For example, HTTP/1.1 (RFC 8615) mandates that the request
11441
11445
line, status line, and headers lines end with CRLF. Since this API operates over a wide range
11442
11446
of newline sequences, a protocol parser utilizing this API could exhibit behaviors unintended
11443
11447
by the protocol's authors.
11444
-
11448
+
11445
11449
The list of recognized newline sequences is CR (U+000D), LF (U+000A), CRLF (U+000D U+000A),
11446
11450
NEL (U+0085), LS (U+2028), FF (U+000C), and PS (U+2029). This list is given by the Unicode
11447
11451
Standard, Sec. 5.8, Recommendation R4 and Table 5-2.
11448
-
11452
+
11449
11453
This method is guaranteed O(n * r) complexity, where <em>n</em> is the length of the input string,
11450
11454
and where <em>r</em> is the length of `replacementText`.
11451
11455
0 commit comments