StringTools
Shift
shift the characters in a string by a given amount
Calling Sequence
Parameters
Description
Examples
Shift( s, shift )
s
-
Maple string
shift
integer; shift amount
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.
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.
with⁡StringTools:
Shift⁡abcde,2
cdefg
Shift⁡abcde,258
Shift⁡abcde,−2
_`abc
Shift⁡abcde,0
abcde
seq⁡Shift⁡abcde,i,i=−5..5
\]^_`,]^_`a,^_`ab,_`abc,`abcd,abcde,bcdef,cdefg,defgh,efghi,fghij
See Also
string
StringTools[Encode]
StringTools[Exchange]
StringTools[Permute]
StringTools[Rotate]
Download Help Document