StringTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

StringTools

  

Shift

  

shift the characters in a string by a given amount

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Shift( s, shift )

Parameters

s

-

Maple string

shift

-

integer; shift amount

Description

• 

The Shift(s, shift) command shifts the characters in a string s by the amount given by shift. The value of shift can be positive, negative, or zero. If the value of shift is zero modulo 256, the original string is returned unchanged.

Examples

withStringTools:

Shiftabcde,2

cdefg

(1)

Shiftabcde,258

cdefg

(2)

Shiftabcde,2

_`abc

(3)

Shiftabcde,0

abcde

(4)

seqShiftabcde,i,i=5..5

\]^_`,]^_`a,^_`ab,_`abc,`abcd,abcde,bcdef,cdefg,defgh,efghi,fghij

(5)

See Also

string

StringTools

StringTools[Encode]

StringTools[Exchange]

StringTools[Permute]

StringTools[Rotate]

 


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