Exchange - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


StringTools

  

Exchange

  

exchange two characters in a string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Exchange( s, m, n )

Parameters

s

-

Maple string

m

-

positive integer

n

-

positive integer

Description

• 

The Exchange( s, m, n ) command exchanges characters m and n in the string s. The integers m and n must satisfy 1m,nlengths.

• 

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:

Exchangeabc,1,2

bac

(1)

Exchangeabc,1,3

cba

(2)

Exchangeabc,3,3

abc

(3)

See Also

string

StringTools

StringTools[Permute]