WMLScript removeAt() 함수

removeAt() 함수는 문자열을 요소로 나누고 지정된 요소를 제거합니다.

문법

n = String.removeAt(string, index, separator)
요소 설명
n 함수에서 반환된 문자열.
string 원래 문자열.
index 삭제할 요소의 인덱스.
separator 구분자.

예제

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

결과

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