This page is also available in 3 other languages

substring()

[스트링개체 함수]

설명

스트링의 서브스트링을 얻음. The starting index is inclusive (the corresponding character is included in the substring), but the optional ending index is exclusive (the corresponding character is not included in the substring). If the ending index is omitted, the substring continues to the end of the String.

문법

myString.substring(from)
myString.substring(from, to)

매개변수

myString: String 형 변수

from: 서브스트링이 시작하는 인덱스

to (옵션): 서브스트링 끝나기 전 인덱스

반환

서브스트링.

더보기