WMLScript removeAt() Function

The removeAt() function divides the string into elements and deletes the specified element.

Syntax

n = String.removeAt(string, index, separator)
Component Description
n The string returned from the function.
string The original string.
index The index of the element to be removed.
separator Separator.

Example

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," ");

Result

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