SAPO::Utility.String->trim

This method will remove white spaces on end and beginning of the string.

This is static method.

Syntax

SAPO.Utility.String.trim(string)

Compatibility

All browsersYes

Depends

Input Parameters

  • (string) string : Input string

Sample

 http://js.sapo.pt/SAPO/Utility/String/sample/

Example

alert(SAPO.Utility.String.trim('  hello HERE I aM   '));

Community feedback

Error: Failed to load processor AddComment
No macro or processor named 'AddComment' found