2023-07-01 11:58:00 -04:00
|
|
|
//Demonstrate how to assign an empty string to a variable.
|
|
|
|
|
local(str = string)
|
|
|
|
|
local(str = '')
|
|
|
|
|
|
|
|
|
|
//Demonstrate how to check that a string is empty.
|
2026-02-01 16:33:20 -08:00
|
|
|
#str->size == 0 // true
|
|
|
|
|
not #str->size // true
|
2023-07-01 11:58:00 -04:00
|
|
|
|
|
|
|
|
//Demonstrate how to check that a string is not empty.
|
|
|
|
|
local(str = 'Hello, World!')
|
2026-02-01 16:33:20 -08:00
|
|
|
#str->size > 0 // true
|
|
|
|
|
#str->size // true
|