Is there a function similar to the C isPrint() function? Or what is a good way to accomplish this function?
isPrint() returns true or false checking whether a character is printable. For example, I have a string that is about a dozen characters long. I would like to check each character to see if it is a printable character - like a letter (a-z or A-Z), a number (0-9), a special character (!@#…), or a carriage return or linefeed.
I ended up using regex matches from the TatumTools extension.
The regex string I used is: [[:print:]\t\n\r]{1,}
It requires all the characters in a string to be either printable, a tab, a newline, or a carriage return.
I found a very neat regex expression builder/tester/tutorial at: https://regex101.com/
My software checks about 1000 strings. It correctly rejected all but one string that contained some non-printable characters. For that string, each non-printable character displays as a mostly black character on the phone display. I don’t how to see the character codes of the few non-printable characters that are getting through.