Repl Function | |
Repeat a string a specified number of times.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION Repl(
cString AS STRING,
dwCount AS DWORD
) AS STRING
public static string Repl(
string cString,
uint dwCount
)
Request Example
View SourceParameters
- cString
- Type: String
The string to repeat. - dwCount
- Type: DWord
The number of times to repeat cString, up to a maximum of MAX_ALLOC. Specifying a value of zero returns a NULL_STRING.
Return Value
Type:
StringRemarks
Replicate() repeatedly displays, prints, or stuffs the keyboard with one or more characters. Replicate() is like the Space() function, which returns a specified number of space characters.
Examples
These examples demonstrate Replicate() repeating strings:
1? Replicate("*", 5)
2? Replicate("Hi ", 2)
3? Replicate(_Chr(42), 5)
This example uses Replicate() to stuff the keyboard with several Down arrow keys:
1Keyboard(Replicate(_Chr(K_DN), 5))
See Also