Fonction removeAt() WMLScript

La fonction removeAt() divise une chaîne en éléments et supprime l'élément spécifié.

Syntaxe

n = String.removeAt(string, index, separator)
Composant Description
n Chaîne retournée par la fonction.
string Chaîne originale.
index Indice de l'élément à supprimer.
separator Séparateur.

Exemple

var a = String.removeAt("Visit CodeW3C.com!",0," ");
var b = String.removeAt("Visit CodeW3C.com!",0,"W");
var c = String.removeAt("Visit CodeW3C.com!",-2," ");
var d = String.removeAt("Visit CodeW3C.com!",10," ");

Résultat

a = "W3School!"
b = "3School!"
c = "W3School!"
d = "Visit"