Close
Close window
Shift - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

StringTools

Shift

shift the characters in a string by a given amount

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.

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:

>

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)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /