Modifier

Partager via


ValueString.Trim Method

Definition

Overloads

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.

Trim()

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

public Microsoft.Windows.EventTracing.ValueString Trim ();
member this.Trim : unit -> Microsoft.Windows.EventTracing.ValueString
Public Function Trim () As ValueString

Returns

The string that remains after all white-space characters are removed from the start and end of the current string. If no characters can be trimmed from the current string, the method returns the current string unchanged.

Applies to

Trim(Char)

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

public Microsoft.Windows.EventTracing.ValueString Trim (char trimChar);
member this.Trim : char -> Microsoft.Windows.EventTracing.ValueString
Public Function Trim (trimChar As Char) As ValueString

Parameters

trimChar
Char

The character to remove.

Returns

The string that remains after all occurrences of the trimChar character are removed from the start and end of the current string. If no characters can be trimmed from the current string, the method returns the current string unchanged.

Applies to

Trim(ReadOnlySpan<Char>)

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

public Microsoft.Windows.EventTracing.ValueString Trim (ReadOnlySpan<char> trimChars);
member this.Trim : ReadOnlySpan<char> -> Microsoft.Windows.EventTracing.ValueString
Public Function Trim (trimChars As ReadOnlySpan(Of Char)) As ValueString

Parameters

trimChars
ReadOnlySpan<Char>

The characters to remove.

Returns

The string that remains after all occurrences of trimChars characters are removed from the start and end of the current string. If trimChars is empty, white-space characters are removed instead. If no characters can be trimmed from the current string, the method returns the current string unchanged.

Applies to