STRING::ISBLANK 1g 2024-04-11 laplante@plcb.ca GOWEB/STRING — Check for Blank Characters


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

category: “GOWEB/STRING”

Name

string::isblank Check for Blank Characters

Synopsis

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

Description

The isblank function checks whether the provided string contains only space (' ') and tab ('\t') characters.

Note:
This is different from isspace, which considers a wider range of whitespace characters such as newlines.


Examples

res={{
    isspace("   "); "\n";
    isspace("\n"); "\n";
    isspace("123"); "\n";
    isblank("   "); "\n";
    isblank("\n"); "\n";
    isblank("123"); "\n";
    isblank("		"); "\n";
    isblank("		"); "\n";
    isblank("		
				"); "\n";
    isblank("		
				"); "\n";
    isblank("		_"); "\n";
    isblank("		_"); "\n";
}}.

Returns:

res=true
true
false
true
false
false
true
true
false
false
false
false

Author

laplante@plcb.ca

See Also


Version