Fonction trim() WMLScript

La fonction trim() retourne une chaîne de caractères sans espaces en début et en fin.

Syntaxe

n = String.trim(string)
Composant Description
n Chaîne de caractères renvoyée par la fonction.
string Une chaîne de caractères.

Exemple

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

Résultat

a = "Visitez CodeW3C.com"