StringTools - Maple Help

Online Help

All Products    Maple    MapleSim


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

StringTools

  

CountCharacterOccurrences

  

count the number of occurrences of a character in a string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

CountCharacterOccurrences( s, ch )

Parameters

s

-

Maple string

ch

-

Maple string; character

Description

• 

The CountCharacterOccurrences( s, ch ) calling sequence counts the number of occurrences of the character ch in the string s. A non-negative integer is returned.

Examples

withStringTools:

CountCharacterOccurrencesabcde,a

1

(1)

CountCharacterOccurrencesabada,a

3

(2)

CountCharacterOccurrences,a

0

(3)

CountCharacterOccurrencesxyz,a

0

(4)

See Also

string

StringTools

StringTools[Exchange]

StringTools[Permute]

StringTools[Rotate]

 


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