convert a string to a character set - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Miscellaneous Utilities : StringTools/Unique

StringTools[Unique] - convert a string to a character set

Calling Sequence

Unique( s )

Parameters

s

-

Maple string

Description

• 

The Unique(s) command returns a string, which contains exactly one instance of each character that occurs in the input string s, using a linear time, constant space algorithm.

• 

The order in which the characters appear in the output string is not defined. In particular, the value returned by Unique may differ from the input even when the input contains no duplicate characters.

• 

To test whether a string s contains more than one instance of some character, use IsPermutations.

Examples

withStringTools:

Uniqueaaaaaa

a

(1)

Uniqueabcabcabc

abc

(2)

Uniquecbacabbac

abc

(3)

Uniquecba

abc

(4)

UniqueRandom1000000,'lower'

abcdefghijklmnopqrstuvwxyz

(5)

See Also

sort, string, StringTools, StringTools[IsPermutation], StringTools[Sort]


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