DIAdem Help

Method: String for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: String for VBS

Generates a text with one or more recurring characters.

vstring = Object.String([number], [character])
ObjectVBS
Object with this method. You do not need to specify this object.
[number]Variant
Specifies the length of the returned text.
[character]Variant
Specifies a character code or a text whose first character repeats the method.
vstringVariant
Receives the text of the given length with a recurring character.

The following example generates a text that contains the character A five times:

Dim MyString
MyString = String(5, "A")   
Call MsgBox(MyString)       ' Returns "AAAAA"
MyString = String(5, 65)
Call MsgBox(MyString)       ' Returns "AAAAA"
MyString = String(5, "ABC")
Call MsgBox(MyString)       ' Returns "AAAAA"

See Also

Objects Overview

Related Topics

Filter | InStr | InStrB | InStrRev | Join | LCase | Left | LeftB | Len | LenB | LTrim | Mid | MidB | Replace | Right | RightB | RTrim | Space | Split | StrComp | String | StrReverse | Trim | UCase

Log in to get a better experience