AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

StringExtensions..::..TrimWhiteSpace Method

Trims whitespace characters including carriage returns, newlines, form feeds, tabs, and vertical tabs.

Namespace:  AdvantageCMS.Core.Common
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static string TrimWhiteSpace(
	this string str
)

Parameters

str
Type: String
The string to trim.

Return Value

The trimmed string.

Examples


C#
string trimmed = "\t  Hello World  \r\n".TrimWhiteSpace(); // returns "Hello World"