Name
IsPrint -- check if character is printable (V7.0)
Synopsis
bool = IsPrint(s$[, pos, encoding])
Function
Checks if the character at index pos inside string s$ is printable and returns True if it is, False otherwise. Printable characters are all characters that have a graphical representation, including the space character. Printable characters are the opposite to control characters. IsPrint() basically does the same as IsGraph(), the only difference being that IsPrint() returns True for the space character as well whereas IsGraph() doesn't. The optional pos parameter must be in characters, not in bytes. It defaults to 0 which will test the first character in s$.

The optional encoding parameter can be used to set the character encoding to use. This defaults to the default string encoding set using SetDefaultEncoding(). See Character encodings for details.

Inputs
s$
source string
pos
optional: index of character to test (defaults to 0)
encoding
optional: character encoding to use (defaults to default string encoding)
Results
bool
True or False, depending on the test's result

Show TOC