StringTools - Maple Programming 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

Parameters

Description

Examples

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.

• 

All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters.  Thus, there is no support for multibyte character encodings, such as unicode encodings.

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