<-- Previous || Up || Next -->

Repeat String Function
String Manipulations Class

Public Function RepeatString( _
      ByVal vRepetitions As Variant _
    , ByVal vRepeat As Variant _
    ) As Variant

Like the Visual Basic String$() function, except all of the characters in the string are repeated instead of only the first character within the string.

       RepeatString(3, "ABC") = "ABCABCABC"
       String$(3, "ABC") = "AAA"
       RepeatString(3, 65) = "AAA"
       Chr$(65) = "A"
       Asc("A") = 65
See also:
    RepeatStringToLength Function
    RepeatStringCharacters Function
    String$ Function (Visual Basic)
Similar to the RepeatStringCharacters function, except that RepeatStringCharacters repeats each of the characters within a string.

vRepetitions: The number of times that the string or character vRepeat is to be repeated. Function returns Null if vRepetitions is Null or cannot be fixed up to a number.

vRepeat: The string or character which is to be replicated. Note: Special argument fix-up code.

Function returns an empty string if vRepeat is an empty string.

If vRepeat is a string, the entire string is repeated the specified number of times.

If vRepeat is numeric, the string is constructed from the character with that ASCII value.

Function returns Null if vRepeat is neither string nor numeric.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.