2019-12-13 21:19:38 +01:00
|
|
|
--DOC_GEN_OUTPUT --DOC_HIDE
|
|
|
|
local gears = require("gears") --DOC_HIDE
|
|
|
|
|
|
|
|
local test = "do.it"
|
|
|
|
local res = gears.string.startswith(test,"do")
|
|
|
|
print(tostring(res)) -- Print boolean value
|
|
|
|
assert(res == true) --DOC_HIDE
|
|
|
|
|
|
|
|
res = gears.string.startswith(test,"it")
|
|
|
|
print(tostring(res)) -- print boolean value
|
|
|
|
assert(res == false) --DOC_HIDE
|
2021-01-27 01:41:08 +01:00
|
|
|
|
|
|
|
res = gears.string.startswith(nil,"do")
|
|
|
|
print(tostring(res)) -- print boolean value
|
|
|
|
assert(res == false) --DOC_HIDE
|