StringTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

StringTools

  

HasIdentifier

  

determine if a string contains valid unquoted Maple identifier characters

  

HasIdentifier1

  

determine if a string contains valid Maple identifier initial characters

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Calling Sequence

HasIdentifier(s)

HasIdentifier1(s)

Parameters

s

-

string; string to test

Description

• 

The HasIdentifier(s) command determines whether s contains characters that are valid as a character in an unquoted Maple identifier.

  

If s contains valid characters, HasIdentifier returns true. Otherwise, false is returned.

• 

The HasIdentifier1(s) command determines whether s contains any characters that are valid as the first character of an unquoted Maple identifier.

  

If s has any characters valid as the first character, HasIdentifier1 returns true. Otherwise, false is returned.

Thread Safety

• 

The StringTools[HasIdentifier] and StringTools[HasIdentifier1] commands are thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

withStringTools:

HasIdentifier ?

true

(1)

HasIdentifierfoo bar

true

(2)

HasIdentifier1 ?

false

(3)

HasIdentifier1foo bar

true

(4)

See Also

convert

length

name

string

StringTools

StringTools[IsIdentifier1]

StringTools[IsIdentifier]

StringTools[Select]