StringTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Character Class Tests : StringTools/Has

StringTools

  

Has

  

determine if a string contains a given character

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Has( s, ch )

Parameters

s

-

string; string to test

ch

-

character; character to test against

Description

• 

The Has( s, ch ) command determines whether the string s contains the character ch. It returns the value true if s contains ch, and false otherwise.

• 

The string ch must not be the empty string. Furthermore, if the length of ch is greater than 1, then characters in ch after the first are ignored.

Examples

withStringTools:

HasABC,A

true

(1)

HasABC,a

false

(2)

Hasfoo:bar,:

true

(3)

See Also

string

StringTools

StringTools[FirstFromLeft]

StringTools[FirstFromRight]

type[character]