StringTools - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Names and Strings : StringTools Package : String Sorting : StringTools/IsSorted

StringTools

 IsSorted
 sort a string

 Calling Sequence IsSorted( s )

Parameters

 s - Maple string

Description

 • The IsSorted(s) command tests whether the characters in the string s appear in sorted order.
 • If s is the empty string, the command returns true.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{IsSorted}\left("abc"\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{IsSorted}\left("acb"\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{IsSorted}\left("aabbcdee"\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{IsSorted}\left(\mathrm{Sort}\left(\mathrm{Random}\left(1000000,'\mathrm{lower}'\right)\right)\right)$
 ${\mathrm{true}}$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam