HasPrintable - Maple Help

StringTools

 HasPrintable
 determine if a string has any printable characters

 Calling Sequence HasPrintable(s)

Parameters

 s - string; string to test

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > s := Iota( 1, 255 ):
 > $\mathrm{HasPrintable}\left(s\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{IsPrintable}\left(s\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{HasPrintable}\left(\mathrm{Select}\left(\mathrm{IsPrintable},s\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{HasPrintable}\left(\mathrm{Remove}\left(\mathrm{IsPrintable},s\right)\right)$
 ${\mathrm{false}}$ (4)

Compatibility

 • The StringTools[HasPrintable] command was updated in Maple 2017.