Changelog updates and Lua fixes
This commit is contained in:
@@ -198,10 +198,10 @@ export const stringApi = new LuaTable({
|
||||
}),
|
||||
|
||||
// Non-standard
|
||||
startswith: new LuaBuiltinFunction((_sf, s: string, prefix: string) => {
|
||||
startsWith: new LuaBuiltinFunction((_sf, s: string, prefix: string) => {
|
||||
return s.startsWith(prefix);
|
||||
}),
|
||||
endswith: new LuaBuiltinFunction((_sf, s: string, suffix: string) => {
|
||||
endsWith: new LuaBuiltinFunction((_sf, s: string, suffix: string) => {
|
||||
return s.endsWith(suffix);
|
||||
}),
|
||||
trim: new LuaBuiltinFunction((_sf, s: string) => {
|
||||
|
||||
@@ -107,11 +107,11 @@ assertEqual(parts[2], "b")
|
||||
assertEqual(parts[3], "c")
|
||||
|
||||
-- Test non-standard string extensions
|
||||
assertEqual(string.startswith("hello world", "hello"), true)
|
||||
assertEqual(string.startswith("hello world", "world"), false)
|
||||
assertEqual(string.startsWith("hello world", "hello"), true)
|
||||
assertEqual(string.startsWith("hello world", "world"), false)
|
||||
|
||||
assertEqual(string.endswith("hello world", "world"), true)
|
||||
assertEqual(string.endswith("hello world", "hello"), false)
|
||||
assertEqual(string.endsWith("hello world", "world"), true)
|
||||
assertEqual(string.endsWith("hello world", "hello"), false)
|
||||
|
||||
-- Extended string.match tests
|
||||
-- Basic pattern matching
|
||||
|
||||
Reference in New Issue
Block a user