Available since Version 1.0.
Checks if a string is empty or contains only whitespace characters.
Syntax
String.IsEmpty( string )Arguments
- string (string | nil): The string to check.
Return Values
- (boolean):
trueif the string is empty or contains only whitespace characters,falseotherwise.
Examples
local emptyString = ""
print(String.IsEmpty(emptyString)) -- Example output: true
local whitespaceString = " "
print(String.IsEmpty(whitespaceString)) -- Example output: true
local nonEmptyString = "Hello"
print(String.IsEmpty(nonEmptyString)) -- Example output: false