util.string.void

Shared

Verifies whether the string is empty or contains only whitespaces


Syntax

local void = util.string.void(
    input
)

Parameters

TypeNameDescription
stringinputString to verify

Returns

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

Examples

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

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

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

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

On this page