exchange two characters in a string - Maple Help

Online Help

All Products    Maple    MapleSim


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

StringTools[Exchange] - exchange two characters in a string

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.

Examples

withStringTools:

Exchangeabc,1,2

bac

(1)

Exchangeabc,1,3

cba

(2)

Exchangeabc,3,3

abc

(3)

See Also

string, StringTools, StringTools[Permute]


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