string class : Trim() method

Description

Returns a string that removed whitespace characters at the beginning and end of the caller.

Syntax

stringInstance.Trim()

Arguments

None

Return value

ClassDescription
stringA string that removed whitespace characters at the beginning and end.

Sample code

//anyString is a instance of string type.

string trimmedString = anyString.Trim();

Notes

It's a wrapper of the System.String.Trim().

Links for reference

Copyright © Rice All rights reserved.