StringTools
HasPunctuation
determine if a string contains a punctuation character
Calling Sequence
Parameters
Description
Thread Safety
Examples
HasPunctuation(s)
s
-
string; string to test
The HasPunctuation( s ) command determines whether s contains a punctuation character. Punctuation characters are printable characters, other than whitespace, for which neither IsControlCharacter nor IsAlphaNumeric returns true.
If s contains a punctuation character, HasPunctuation returns true. Otherwise, false is returned.
All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
The StringTools[HasPunctuation] command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
with⁡StringTools:
HasPunctuation⁡abcde
false
HasPunctuation⁡abc,de
true
See Also
convert
length
string
StringTools[IsAlphaNumeric]
StringTools[IsControlCharacter]
StringTools[IsPunctuation]
Download Help Document