StringTools
HasPrintable
determine if a string has any printable characters
Calling Sequence
Parameters
Description
Thread Safety
Examples
Compatibility
HasPrintable(s)
s
-
string; string to test
The HasPrintable(s) command determines whether s has any printable characters. Printable characters are identified by the predicate IsPrintable.
If s contains a printable character, then HasPrintable 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[HasPrintable] command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
with⁡StringTools:
s := Iota( 1, 255 ):
HasPrintable⁡s
true
IsPrintable⁡s
false
HasPrintable⁡Select⁡IsPrintable,s
HasPrintable⁡Remove⁡IsPrintable,s
The StringTools[HasPrintable] command was updated in Maple 2017.
See Also
convert
length
string
StringTools[HasASCII]
StringTools[HasControlCharacter]
StringTools[IsPrintable]
StringTools[Select]
Download Help Document