Rune.TryGetRuneAt(String, Int32, Rune) Method

Definition

Attempts to get the Rune that begins at a specified position in a string, and return a value that indicates whether the operation succeeded.

public static bool TryGetRuneAt (string input, int index, out System.Text.Rune value);

Parameters

input
String

The string from which to extract the rune.

index
Int32

The zero-based index from which to extract the rune.

value
Rune

When this method returns, the decoded rune.

Returns

true if a scalar value was successfully extracted from the specified index; false if a value could not be extracted because of invalid data.

Exceptions

input is null.

index is out of the range of input.

Remarks

Throws an exception if input is null or index is out of range.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9