編集

次の方法で共有


ValueString Struct

Definition

Represents text as a sequence of UTF-16 code units that is not necessarily allocated on the managed heap.

public struct ValueString
type ValueString = struct
Public Structure ValueString
Inheritance
ValueString

Constructors

ValueString(ReadOnlySpan<Char>)

Initializes a new instance of the ValueString structure.

Properties

Empty

Returns an empty ValueString.

IsEmpty

Gets a value that indicates whether the string is empty.

Item[Int32]

Gets the character at the specified zero-based index in the string.

Length

Gets the number of characters in the string.

Span

Gets the character contents of the string.

Methods

CompareOrdinal(ValueString, ValueString)

Compares to strings by evaluating the numeric values of the corresponding characters in each string.

CompareTo(ValueString)

Compares this string with a specified string by evaluating the numeric values of the corresponding characters in each string.

Contains(Char)

Returns a value indicating whether the specified character occurs within the string.

Contains(ValueString)

Returns a value indicating whether the specified substring occurs within the string.

CopyTo(Span<Char>)

Copies the contents of this string into a destination Span<T>.

EndsWith(Char)

Determines whether this string ends with the specified character.

EndsWith(ValueString)

Determines whether this string ends with the specified string.

Equals(Object)
GetEnumerator()

Gets an enumerator for the characters in this string.

GetHashCode()
GetPinnableReference()

Get a read-only reference to a character that can be used for pinning and is required to support the use of ValueString within a fixed statement.

IndexOf(Char)

Reports the zero-based index of the first occurrence of the specified character in this string.

IndexOf(ValueString)

Reports the zero-based index of the first occurrence of the specified string in this string.

IndexOfAny(ReadOnlySpan<Char>)

Reports the zero-based index of the first occurrence in this string of any character in the specified list.

IsEmptyOrWhiteSpace()

Indicates whether the string is empty or consists only of white-space characters.

LastIndexOf(Char)

Reports the zero-based index of the last occurrence of the specified character in this string.

LastIndexOf(ValueString)

Reports the zero-based index of the last occurrence of the specified string in this string.

LastIndexOfAny(ReadOnlySpan<Char>)

Reports the zero-based index of the last occurrence in this string of any character in the specified list.

StartsWith(Char)

Determines whether this string starts with the specified character.

StartsWith(ValueString)

Determines whether this string starts with the specified string.

Substring(Int32, Int32)

Retrieves a substring from this string. The substring starts at the specified zero-based character index and has the specified length.

Substring(Int32)

Retrieves a substring from this string. The substring starts at the specified zero-based character index and continues to the end of the string.

ToArray()

Copies the contents of this string into a new array.

ToString()

Allocates a String containing the same characters as this string.

Trim()

Removes all leading and trailing white-space characters from this string.

Trim(Char)

Remove all leading and trailing occurrences of a specified character from this string.

Trim(ReadOnlySpan<Char>)

Removes all leading and trailing occurrences of a set of characters from the current string.

TrimEnd()

Removes all the trailing white-space characters from this string.

TrimEnd(Char)

Remove all trailing occurrences of a specified character from this string.

TrimEnd(ReadOnlySpan<Char>)

Removes all the trailing occurrences of a set of characters from the current string.

TrimStart()

Removes all the leading white-space characters from this string.

TrimStart(Char)

Remove all leading occurrences of a specified character from this string.

TrimStart(ReadOnlySpan<Char>)

Removes all the leading occurrences of a set of characters from the current string.

TryCopyTo(Span<Char>)

Attempts to copy the contents of this string into a Span<T> and returns a value indicating whether or not the operation succeeded.

Operators

Equality(ValueString, ValueString)

Determines whether two ValueStrings have the same contents.

Implicit(ReadOnlySpan<Char> to ValueString)

Defines an implicit conversion of a ReadOnlySpan<T> to a ValueString.

Implicit(String to ValueString)

Defines an implicit conversion of a String to a ValueString.

Inequality(ValueString, ValueString)

Determines whether two ValueStrings have different contents.

Applies to