rotate the characters in a string by a given amount - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Transformations : StringTools/Rotate

StringTools[Rotate] - rotate the characters in a string by a given amount

Calling Sequence

Rotate( s, offset )

Parameters

s

-

Maple string

offset

-

integer; number of characters by which to rotate the string

Description

• 

The Rotate(s, offset) command rotates a string s by the number of characters given in offset. The value of offset can be positive, negative, or zero. If the value of offset is zero, the original string is returned unchanged.

Examples

withStringTools:

Rotateabcde,2

deabc

(1)

Rotateabcde,22

deabc

(2)

Rotateabcde,2

deabc

(3)

Rotateabcde,0

abcde

(4)

seqRotateabcde,i,i=100..100

abcde,bcdea,cdeab,deabc,eabcd

(5)

See Also

string, StringTools


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam