Skip to content

Automatic port of System.Globalization.CompareInfo docs #4884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 70 additions & 28 deletions xml/System.Globalization/CompareInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2222,13 +2222,23 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="source">To be added.</param>
<param name="value">To be added.</param>
<param name="options">To be added.</param>
<param name="matchLength">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="source">The read-only span of characters to search within.</param>
<param name="value">The read-only span of characters containing the substring to locate within <paramref name="source" />.</param>
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the search.</param>
<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>
<summary>Searches for the first occurrence of a substring within a source string.</summary>
<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>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

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.

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="options" /> contains an unsupported combination of flags.</exception>
</Docs>
</Member>
<Member MemberName="IndexOf">
Expand Down Expand Up @@ -3097,13 +3107,24 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="source">To be added.</param>
<param name="prefix">To be added.</param>
<param name="options">To be added.</param>
<param name="matchLength">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="source">The read-only span of characters to search within.</param>
<param name="prefix">The read-only span of characters containing the prefix to attempt to match at the start of <paramref name="source" />.</param>
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the match.</param>
<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>
<summary>Determines whether a string starts with a specific prefix.</summary>
<returns>
<see langword="true" /> if <paramref name="prefix" /> occurs at the start of <paramref name="source" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

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.

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="options" /> contains an unsupported combination of flags.</exception>
</Docs>
</Member>
<MemberGroup MemberName="IsSortable">
Expand Down Expand Up @@ -3556,13 +3577,24 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="source">To be added.</param>
<param name="suffix">To be added.</param>
<param name="options">To be added.</param>
<param name="matchLength">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="source">The read-only span of characters to search within.</param>
<param name="suffix">The read-only span of characters containing the suffix to attempt to match at the end of <paramref name="source" />.</param>
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the match.</param>
<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>
<summary>Determines whether a string ends with a specific suffix.</summary>
<returns>
<see langword="true" /> if <paramref name="suffix" /> occurs at the end of <paramref name="source" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

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.

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="options" /> contains an unsupported combination of flags.</exception>
</Docs>
</Member>
<MemberGroup MemberName="LastIndexOf">
Expand Down Expand Up @@ -4218,13 +4250,23 @@ Use <xref:System.Globalization.CompareInfo.GetSortKeyLength(System.ReadOnlySpan{
<Parameter Name="matchLength" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="source">To be added.</param>
<param name="value">To be added.</param>
<param name="options">To be added.</param>
<param name="matchLength">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="source">The read-only span of characters to search within.</param>
<param name="value">The read-only span of characters containing the substring to locate within <paramref name="source" />.</param>
<param name="options">The <see cref="T:System.Globalization.CompareOptions" /> to use during the search.</param>
<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>
<summary>Searches for the last occurrence of a substring within a source string.</summary>
<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>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

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.

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="options" /> contains an unsupported combination of flags.</exception>
</Docs>
</Member>
<Member MemberName="LastIndexOf">
Expand Down