Lua: tweaks and docs

This commit is contained in:
Zef Hemel
2025-01-14 20:26:47 +01:00
parent cbf227fa49
commit 5604f6d8c2
20 changed files with 284 additions and 132 deletions
+8
View File
@@ -157,4 +157,12 @@ export const stringApi = new LuaTable({
split: new LuaBuiltinFunction((_sf, s: string, sep: string) => {
return s.split(sep);
}),
// Non-standard
startswith: new LuaBuiltinFunction((_sf, s: string, prefix: string) => {
return s.startsWith(prefix);
}),
endswith: new LuaBuiltinFunction((_sf, s: string, suffix: string) => {
return s.endsWith(suffix);
}),
});