STRING::ISPRINT 1g 2024-04-14 laplante@plcb.ca GOWEB/STRING — Check for Printable Characters


title: “STRING::ISPRINT” version: “1.0.0” date: 2024-04-14 author: “laplante@plcb.ca” section: “1g”

category: “GOWEB/STRING”

Name

string::isprint Check for Printable Characters

Synopsis

string::isprint(string[, error: variable, string...])
isprint(string[, error: variable, string...])

Description

The isprint function checks whether the provided string contains only printable characters.

According to the Unicode standard, a character is considered printable if it falls within one of the following categories:


Examples

res={{
    isprint("a"); "\n";
    isprint(" "); "\n";
    isprint("1"); "\n";
    isprint("\t"); "\n";
    isprint("\n"); "\n";
    isprint("abc"); "\n";
    isprint("abcéèç"); "\n";
    isprint("☺"); "\n";
}}.

Returns:

res=true
true
true
false
false
true
true
true

Author

laplante@plcb.ca

See Also


Version