Skip to content

Commit d04ee76

Browse files
authored
Fix remarks of String.ReplaceLineEndings (#7908)
1 parent 7536fe5 commit d04ee76

File tree

1 file changed

+10
-28
lines changed

1 file changed

+10
-28
lines changed

xml/System/String.xml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11756,24 +11756,15 @@ Because this method returns the modified string, you can chain together successi
1175611756

1175711757
## Remarks
1175811758

11759-
This method searches for all newline sequences within the string and canonicalizes them to match
11760-
the newline sequence for the current environment. For example, when running on Windows, all
11761-
occurrences of non-Windows newline sequences will be replaced with the sequence CRLF. When
11762-
running on Unix, all occurrences of non-Unix newline sequences will be replaced with
11763-
a single LF character.
11759+
This method searches for all newline sequences within the string and canonicalizes them to match the newline sequence for the current environment. For example, when running on Windows, all occurrences of non-Windows newline sequences will be replaced with the sequence CRLF. When running on Unix, all occurrences of non-Unix newline sequences will be replaced with a single LF character.
1176411760

11765-
It is not recommended that protocol parsers utilize this API. Protocol specifications often
11766-
mandate specific newline sequences. For example, HTTP/1.1 (RFC 8615) mandates that the request
11767-
line, status line, and headers lines end with CRLF. Since this API operates over a wide range
11768-
of newline sequences, a protocol parser utilizing this API could exhibit behaviors unintended
11769-
by the protocol's authors.
11761+
It is not recommended that protocol parsers utilize this API. Protocol specifications often mandate specific newline sequences. For example, HTTP/1.1 (RFC 8615) mandates that the request line, status line, and headers lines end with CRLF. Since this API operates over a wide range of newline sequences, a protocol parser utilizing this API could exhibit behaviors unintended by the protocol's authors.
1177011762

11771-
This overload is equivalent to calling <xref:System.String.ReplaceLineEndings(System.String)>, passing
11772-
<xref:System.Environment.NewLine> as the <em>replacementText</em> parameter.
11763+
This overload is equivalent to calling <xref:System.String.ReplaceLineEndings(System.String)>, passing <xref:System.Environment.NewLine> as the <em>replacementText</em> parameter.
1177311764

11774-
This method is guaranteed O(n) complexity, where <em>n</em> is the length of the input string.
11765+
This method is guaranteed O(n) complexity, where <em>n</em> is the length of the input string.
1177511766

11776-
]]></format>
11767+
]]></format>
1177711768
</remarks>
1177811769
</Docs>
1177911770
</Member>
@@ -11811,24 +11802,15 @@ This method searches for all newline sequences within the string and canonicaliz
1181111802

1181211803
## Remarks
1181311804

11814-
This method searches for all newline sequences within the string and canonicalizes them to the
11815-
newline sequence provided by `replacementText`. If `replacementText`
11816-
is <xref:System.String.Empty>, all newline sequences within the string will be removed.
11805+
This method searches for all newline sequences within the string and canonicalizes them to the newline sequence provided by `replacementText`. If `replacementText` is <xref:System.String.Empty>, all newline sequences within the string will be removed.
1181711806

11818-
It is not recommended that protocol parsers utilize this API. Protocol specifications often
11819-
mandate specific newline sequences. For example, HTTP/1.1 (RFC 8615) mandates that the request
11820-
line, status line, and headers lines end with CRLF. Since this API operates over a wide range
11821-
of newline sequences, a protocol parser utilizing this API could exhibit behaviors unintended
11822-
by the protocol's authors.
11807+
It is not recommended that protocol parsers utilize this API. Protocol specifications often mandate specific newline sequences. For example, HTTP/1.1 (RFC 8615) mandates that the request line, status line, and headers lines end with CRLF. Since this API operates over a wide range of newline sequences, a protocol parser utilizing this API could exhibit behaviors unintended by the protocol's authors.
1182311808

11824-
The list of recognized newline sequences is CR (U+000D), LF (U+000A), CRLF (U+000D U+000A),
11825-
NEL (U+0085), LS (U+2028), FF (U+000C), and PS (U+2029). This list is given by the Unicode
11826-
Standard, Sec. 5.8, Recommendation R4 and Table 5-2.
11809+
The list of recognized newline sequences is CR (U+000D), LF (U+000A), CRLF (U+000D U+000A), NEL (U+0085), LS (U+2028), FF (U+000C), and PS (U+2029). This list is given by the Unicode Standard, Sec. 5.8, Recommendation R4 and Table 5-2.
1182711810

11828-
This method is guaranteed O(n * r) complexity, where <em>n</em> is the length of the input string,
11829-
and where <em>r</em> is the length of `replacementText`.
11811+
This method is guaranteed O(n * r) complexity, where <em>n</em> is the length of the input string, and where <em>r</em> is the length of `replacementText`.
1183011812

11831-
]]></format>
11813+
]]></format>
1183211814
</remarks>
1183311815
</Docs>
1183411816
</Member>

0 commit comments

Comments
 (0)