VBScriptのString関数
文字列関数は、重複した文字の指定した長さを含む文字列を返します。
文法
String(number,character)
参数 | 描述 |
---|---|
number | 必需。被返回字符串的长度。 |
character | 必需。被重复的字符。 |
例1
document.write(String(10,"#"))
Output:
##########
Output:
##########
例2
document.write(String(4,"*"))
Output:
****
Output:
****
例3
document.write(String(4,42))
Output:
****
Output:
****
例4
document.write(String(4,"XYZ"))
Output:
XXXX
Output:
XXXX
完全なVBScriptのリファレンス