Table of Contents

TrimAll Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/StringExtensions.cs

TrimAll(string)

Removes all occurrences of white-space characters from the specified value.

public static string TrimAll(this string value)

Parameters

value string

The string to extend.

Returns

string

The string that remains after all occurrences of white-space characters are removed from the specified value.

Exceptions

ArgumentNullException

value is null.

TrimAll(string, params char[])

Removes all occurrences of a set of characters specified in trimChars from the specified value.

public static string TrimAll(this string value, params char[] trimChars)

Parameters

value string

The string to extend.

trimChars char[]

An array of Unicode characters to remove. Default value is WhiteSpace.

Returns

string

The string that remains after all occurrences of the characters in the trimChars parameter are removed from the specified value.

Exceptions

ArgumentNullException

value is null.