Vital.sandbox
String

string.void

Shared

Verifies whether the string is empty or contains only whitespaces


Syntax

local void = string.void(input)

Parameters

TypeNameDescription
stringinputString to be verified

Returns

TypeNameDescription
boolvoidtrue if the string is empty or contains only whitespaces, false otherwise

Examples

Return true for an empty string
local void = string.void("")

engine.print("info", void) --true
Return true for a whitespace-only string
local void = string.void("      ")

engine.print("info", void) --true
Return false for a non-empty string
local void = string.void("Hello")

engine.print("info", void) --false

On this page