Question whether given string is empty or contains only of space characters

string:is_blank?(STRING $string) : BOOL

string:is_blank?(' ')
#=> TRUE

string:is_blank?('')
#=> TRUE

string:is_blank?(' abc ')
#=> FALSE

string:is_blank?("\n")
#=> TRUE

# tabs, newlines and other characters are considered blank characters
string:is_blank?("\t\n")
#=> TRUE

string:is_blank?("\nhi\t\n")
#=> FALSE

Copyright ©2013-2022 SunSed®. All rights reserved.