Click or drag to resize

ExtensionMethodsTrim Method

Removes a string from the front and end of another string.

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: (
public static string Trim(
	this string inputText,
	string value,
	StringComparison comparisonType = StringComparison.CurrentCulture


Type: SystemString
The string to trim.
Type: SystemString
The value to trim from the string.
comparisonType (Optional)
Type: SystemStringComparison
How to compare the strings.

Return Value

Type: String
A trimmed string from the input

Usage Note

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).
See Also