WMLScript removeAt() Function
Complete WMLScript String Library
The removeAt() function divides a string into elements and removes a
specified element.
Syntax
n = String.removeAt(string, index, separator) |
Part |
Description |
n |
The string returned from the function |
string |
The original string |
index |
The index of the element to be removed |
separator |
The dividing separator |
Example
var a = String.removeAt("Visit W3Schools!",0," ");
var b = String.removeAt("Visit W3Schools!",0,"W");
var c = String.removeAt("Visit W3Schools!",-2," ");
var d = String.removeAt("Visit W3Schools!",10," ");
|
Result
a = "W3Schools!"
b = "3Schools!"
c = "W3Schools!"
d = "Visit"
|
Complete WMLScript String Library
|