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
Automatic port of System.Globalization.CompareInfo docs (#4884)
* Automatic port of System.Globalization.CompareInfo docs
* Apply suggestions from code review
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
<param name="source">The read-only span of characters to search within.</param>
2226
+
<param name="value">The read-only span of characters containing the substring to locate within <paramref name="source" />.</param>
2227
+
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the search.</param>
2228
+
<param name="matchLength">When this method returns, contains the number of characters of <paramref name="source" /> that matched the desired value. This may be different than the length of <paramref name="value" /> if a linguistic comparison is performed. Set to 0 if <paramref name="value" /> is not found within <paramref name="source" />.</param>
2229
+
<summary>Searches for the first occurrence of a substring within a source string.</summary>
2230
+
<returns>The zero-based index into <paramref name="source" /> where the substring <paramref name="value" /> first appears; or a negative value if <paramref name="value" /> cannot be found within <paramref name="source" />.</returns>
2231
+
<remarks>
2232
+
<format type="text/markdown"><![CDATA[
2233
+
2234
+
## Remarks
2235
+
2236
+
This method has greater overhead than other <xref:System.Globalization.CompareInfo.IndexOf%2A> overloads which don't take a `matchLength` argument. Call this overload only if you require the match length information.
2237
+
2238
+
]]></format>
2239
+
</remarks>
2240
+
<exception cref="T:System.ArgumentException">
2241
+
<paramref name="options" /> contains an unsupported combination of flags.</exception>
2232
2242
</Docs>
2233
2243
</Member>
2234
2244
<Member MemberName="IndexOf">
@@ -3097,13 +3107,24 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<param name="source">The read-only span of characters to search within.</param>
3111
+
<param name="prefix">The read-only span of characters containing the prefix to attempt to match at the start of <paramref name="source" />.</param>
3112
+
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the match.</param>
3113
+
<param name="matchLength">When this method returns, contains the number of characters of <paramref name="source" /> that matched the desired prefix. This may be different than the length of <paramref name="prefix" /> if a linguistic comparison is performed. Set to 0 if the prefix did not match.</param>
3114
+
<summary>Determines whether a string starts with a specific prefix.</summary>
3115
+
<returns>
3116
+
<see langword="true" /> if <paramref name="prefix" /> occurs at the start of <paramref name="source" />; otherwise, <see langword="false" />.</returns>
3117
+
<remarks>
3118
+
<format type="text/markdown"><![CDATA[
3119
+
3120
+
## Remarks
3121
+
3122
+
This method has greater overhead than other <xref:System.Globalization.CompareInfo.IsPrefix(System.String,System.String,System.Globalization.CompareOptions)> overloads which don't take a `matchLength` argument. Call this overload only if you require the match length information.
3123
+
3124
+
]]></format>
3125
+
</remarks>
3126
+
<exception cref="T:System.ArgumentException">
3127
+
<paramref name="options" /> contains an unsupported combination of flags.</exception>
3107
3128
</Docs>
3108
3129
</Member>
3109
3130
<MemberGroup MemberName="IsSortable">
@@ -3556,13 +3577,24 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<param name="source">The read-only span of characters to search within.</param>
3581
+
<param name="suffix">The read-only span of characters containing the suffix to attempt to match at the end of <paramref name="source" />.</param>
3582
+
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the match.</param>
3583
+
<param name="matchLength">When this method returns, contains the number of characters of <paramref name="source" /> that matched the desired suffix. This may be different than the length of <paramref name="suffix" /> if a linguistic comparison is performed. Set to 0 if the suffix did not match.</param>
3584
+
<summary>Determines whether a string ends with a specific suffix.</summary>
3585
+
<returns>
3586
+
<see langword="true" /> if <paramref name="suffix" /> occurs at the end of <paramref name="source" />; otherwise, <see langword="false" />.</returns>
3587
+
<remarks>
3588
+
<format type="text/markdown"><![CDATA[
3589
+
3590
+
## Remarks
3591
+
3592
+
This method has greater overhead than other <xref:System.Globalization.CompareInfo.IsSuffix(System.String,System.String,System.Globalization.CompareOptions)> overloads which don't take a `matchLength` argument. Call this overload only if you require the match length information.
3593
+
3594
+
]]></format>
3595
+
</remarks>
3596
+
<exception cref="T:System.ArgumentException">
3597
+
<paramref name="options" /> contains an unsupported combination of flags.</exception>
3566
3598
</Docs>
3567
3599
</Member>
3568
3600
<MemberGroup MemberName="LastIndexOf">
@@ -4218,13 +4250,23 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<param name="source">The read-only span of characters to search within.</param>
4254
+
<param name="value">The read-only span of characters containing the substring to locate within <paramref name="source" />.</param>
4255
+
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the search.</param>
4256
+
<param name="matchLength">When this method returns, contains the number of characters of <paramref name="source" /> that matched the desired value. This may be different than the length of <paramref name="value" /> if a linguistic comparison is performed. Set to 0 if <paramref name="value" /> is not found within <paramref name="source" />.</param>
4257
+
<summary>Searches for the last occurrence of a substring within a source string.</summary>
4258
+
<returns>The zero-based index into <paramref name="source" /> where the substring <paramref name="value" /> last appears; or a negative number if <paramref name="value" /> cannot be found within <paramref name="source" />.</returns>
4259
+
<remarks>
4260
+
<format type="text/markdown"><![CDATA[
4261
+
4262
+
## Remarks
4263
+
4264
+
This method has greater overhead than other <xref:System.Globalization.CompareInfo.LastIndexOf%2A> overloads which don't take a `matchLength` argument. Call this overload only if you require the match length information.
4265
+
4266
+
]]></format>
4267
+
</remarks>
4268
+
<exception cref="T:System.ArgumentException">
4269
+
<paramref name="options" /> contains an unsupported combination of flags.</exception>
0 commit comments