Skip to content

Commit b2e19c0

Browse files
authored
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>
1 parent a0b8b79 commit b2e19c0

File tree

1 file changed

+70
-28
lines changed

1 file changed

+70
-28
lines changed

xml/System.Globalization/CompareInfo.xml

Lines changed: 70 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,13 +2222,23 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
22222222
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
22232223
</Parameters>
22242224
<Docs>
2225-
<param name="source">To be added.</param>
2226-
<param name="value">To be added.</param>
2227-
<param name="options">To be added.</param>
2228-
<param name="matchLength">To be added.</param>
2229-
<summary>To be added.</summary>
2230-
<returns>To be added.</returns>
2231-
<remarks>To be added.</remarks>
2225+
<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>
22322242
</Docs>
22332243
</Member>
22342244
<Member MemberName="IndexOf">
@@ -3097,13 +3107,24 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
30973107
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
30983108
</Parameters>
30993109
<Docs>
3100-
<param name="source">To be added.</param>
3101-
<param name="prefix">To be added.</param>
3102-
<param name="options">To be added.</param>
3103-
<param name="matchLength">To be added.</param>
3104-
<summary>To be added.</summary>
3105-
<returns>To be added.</returns>
3106-
<remarks>To be added.</remarks>
3110+
<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>
31073128
</Docs>
31083129
</Member>
31093130
<MemberGroup MemberName="IsSortable">
@@ -3556,13 +3577,24 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
35563577
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
35573578
</Parameters>
35583579
<Docs>
3559-
<param name="source">To be added.</param>
3560-
<param name="suffix">To be added.</param>
3561-
<param name="options">To be added.</param>
3562-
<param name="matchLength">To be added.</param>
3563-
<summary>To be added.</summary>
3564-
<returns>To be added.</returns>
3565-
<remarks>To be added.</remarks>
3580+
<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>
35663598
</Docs>
35673599
</Member>
35683600
<MemberGroup MemberName="LastIndexOf">
@@ -4218,13 +4250,23 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
42184250
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
42194251
</Parameters>
42204252
<Docs>
4221-
<param name="source">To be added.</param>
4222-
<param name="value">To be added.</param>
4223-
<param name="options">To be added.</param>
4224-
<param name="matchLength">To be added.</param>
4225-
<summary>To be added.</summary>
4226-
<returns>To be added.</returns>
4227-
<remarks>To be added.</remarks>
4253+
<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>
42284270
</Docs>
42294271
</Member>
42304272
<Member MemberName="LastIndexOf">

0 commit comments

Comments
 (0)