StringPolyfillExtensionTrim(String, ReadOnlySpan`1Char) Method
Generates a
String from which all leading and trailing
occurrences of the characters in the specified read-only span are removed.
Namespace: FolkerKinzel.StringsAssembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
public static string Trim(
this string s,
ReadOnlySpan<char> trimChars
)
<ExtensionAttribute>
Public Shared Function Trim (
s As String,
trimChars As ReadOnlySpan(Of Char)
) As String
public:
[ExtensionAttribute]
static String^ Trim(
String^ s,
ReadOnlySpan<wchar_t> trimChars
)
[<ExtensionAttribute>]
static member Trim :
s : string *
trimChars : ReadOnlySpan<char> -> string
- s String
- The String to change.
- trimChars ReadOnlySpanChar
- A read-only span of Unicode characters to remove. If
trimChars is an empty span, Unicode white-space characters are
removed instead.
StringThe resulting
String after removing all characters passed
in the
trimChars parameter from the beginning and end of the
String.In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).