WMLScript trim() Function

The trim() function of WMLScript returns a string after removing spaces at the beginning and end.

Syntax

n = String.trim(string)
Component Description
n String returned from the function.
string A string.

Example

var a = String.trim(" Visit CodeW3C.com ");

Result

a = "Visit CodeW3C.com"