Fonction de chaîne VBScript


❮ Référence complète de VBScript

La fonction String renvoie une chaîne qui contient un caractère répétitif d'une longueur spécifiée.

Syntaxe

String(number,character)

Parameter Description
number Required. The length of the returned string
character Required. The character that will be repeated

Exemple 1

response.write(String(10,"#"))

Output:

##########

Exemple 2

response.write(String(4,"*"))

Output:

****

Exemple 3

response.write(String(4,42))

Output:

****

Exemple 4

response.write(String(4,"XYZ"))

Output:

XXXX

❮ Référence complète de VBScript