STRING(number, character)

Returns a repeating character of a given length (String).


numberThe length of the returned string (Long)
characterThe character code specifying the character or string expression whose first character is used to build the return string (Variant)

REMARKS
* If "number" > 256, then the number used is "character" Mod 256.
* If "number" is Null, then Null is returned.
* If "character" is a number, then it is converted to a character.
* If "character" < 0, then
* If "character" > 0 and "character" < 255, then
* If "character" > 255, then
* If "character" is Null, then Null is returned
* You can use the STR function to return the text string of a number.
* You can use the STRREVERSE function to return the text string with the characters reversed.
* You can use the STRING$ function to return a String data type instead of a Variant/String data type.
* For the Microsoft documentation refer to docs.microsoft.com

String(5,"a") = "aaaaa" 
String(2,abcd"0 = "aa"
String(3,"abcd") = "aaa"
String(4,"b") = "bbbb"
String(5,40) = "((((("
String(5,80) = "PPPPP"
String(5,"") - run time error

© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited Top