From Zelda Wiki, the Zelda encyclopedia
Jump to navigation
Jump to search
startsWith(str, substr)
Returns
true
if str
starts with substr
, else false
.
Examples
# | Input | Output | Result |
---|
1 | startsWith("Fooloo Limpah", "Foo")
|
| |
2 | startsWith("Fooloo Limpah", "foo")
|
| |
3 | startsWith("Fooloo Limpah", "")
|
| |
4 | startsWith("[[foo]]", "[[")
|
| |
local function startsWith(str, substr)
return substr == string.sub(str, 1, #substr)
end
return startsWith