Navigation: thinBasic Modules > Core > String handling > 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'
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |