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