<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > String functions > Rotate$ |
Description
Switch left or right a string buffer.
Syntax
s = ROTATE$(StringExpression, nChars)
Returns
String
Parameters
Name |
Type |
Optional |
Meaning |
StringExpression |
String |
No |
Original string to rotate |
nChars |
Numeric |
No |
Number of chars to rotate right (if positive) or left (if negative) |
Remarks
Restrictions
See also
Examples
Thanks to Psch for the following script example
' Usage of the Rotate$ Keyword example
Dim s As String
s = ROTATE$("ANANAS", 1)
MSGBOX 0, s ' -- This would show 'SANANA'
s = ROTATE$("ANANAS", -1)
MSGBOX 0, s ' -- This would show 'NANASA'