Skip to content

Update docs on Rune.DecodeFromUtf8 #11611

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions xml/System.Text/Rune.xml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ The general convention is to call this method in a loop, slicing the `source` bu
<returns>
<see cref="F:System.Buffers.OperationStatus.Done" /> if the source buffer begins with a valid UTF-8 encoded scalar value. <paramref name="result" /> then contains the decoded <see cref="T:System.Text.Rune" />, and <paramref name="bytesConsumed" /> contains the number of <see cref="T:System.Byte" /> values used in the input buffer to encode the <see cref="T:System.Text.Rune" />.

<see cref="F:System.Buffers.OperationStatus.NeedMoreData" /> if the source buffer is empty or contains only a standalone UTF-8 high surrogate character. <paramref name="result" /> then contains <see cref="P:System.Text.Rune.ReplacementChar" />, and <paramref name="bytesConsumed" /> contains the length of the input buffer.
<see cref="F:System.Buffers.OperationStatus.NeedMoreData" /> if the source buffer is empty or contains only a partial UTF-8 subsequence. <paramref name="result" /> then contains <see cref="P:System.Text.Rune.ReplacementChar" />, and <paramref name="bytesConsumed" /> contains the length of the input buffer.

<see cref="F:System.Buffers.OperationStatus.InvalidData" /> if the source buffer begins with an ill-formed UTF-8 encoded scalar value. <paramref name="result" /> then contains <see cref="P:System.Text.Rune.ReplacementChar" />, and <paramref name="bytesConsumed" /> contains the number of <see cref="T:System.Byte" /> values used in the input buffer to encode the ill-formed sequence.
.</returns>
Expand Down Expand Up @@ -427,7 +427,7 @@ This method is very similar to <xref:System.Text.Rune.DecodeFromUtf16(System.Rea
<returns>
<see cref="F:System.Buffers.OperationStatus.Done" /> if the source buffer ends with a valid UTF-8 encoded scalar value. <paramref name="value" /> then contains the decoded <see cref="T:System.Text.Rune" />, and <paramref name="bytesConsumed" /> contains the number of <see cref="T:System.Byte" /> values used in the input buffer to encode the <see cref="T:System.Text.Rune" />.

<see cref="F:System.Buffers.OperationStatus.NeedMoreData" /> if the source buffer is empty or contains only a standalone UTF-8 high surrogate character. <paramref name="value" /> then contains <see cref="P:System.Text.Rune.ReplacementChar" />, and <paramref name="bytesConsumed" /> contains the length of the input buffer.
<see cref="F:System.Buffers.OperationStatus.NeedMoreData" /> if the source buffer is empty or contains only a partial UTF-8 subsequence. <paramref name="value" /> then contains <see cref="P:System.Text.Rune.ReplacementChar" />, and <paramref name="bytesConsumed" /> contains the length of the input buffer.

<see cref="F:System.Buffers.OperationStatus.InvalidData" /> if the source buffer ends with an ill-formed UTF-8 encoded scalar value. <paramref name="value" /> then contains <see cref="P:System.Text.Rune.ReplacementChar" />, and <paramref name="bytesConsumed" /> contains the number of <see cref="T:System.Byte" /> values used in the input buffer to encode the ill-formed sequence.
</returns>
Expand Down