VBScript Len 함수

정의와 사용법

Len 함수는 문자열에 있는 문자의 수를 반환할 수 있습니다.

문법

Len(string|varname)
매개변수 설명
string 문자열 표현식.
varname 변수 이름.

예제

예제 1

dim txt
txt="This is a beautiful day!"
document.write(Len(txt))

출력:

24

예제 2

document.write(Len("This is a beautiful day!"))

출력:

24