METHOD
String.Trim
Returns text with surrounding whitespace removed; internal whitespace is retained.
Formal Syntax & Structure
csharp syntaxcsharp
text.Trim()Working Example
Example Snippetcsharp
string clean = " A ".Trim();Returns text with surrounding whitespace removed; internal whitespace is retained.
text.Trim()string clean = " A ".Trim();