add search engine - ringle

This commit is contained in:
Face
2025-08-27 20:23:05 +03:00
parent 1cf81bbfee
commit 347b40ed71
47 changed files with 7214 additions and 493 deletions

View File

@@ -118,6 +118,12 @@ static func string_replace_all_handler(vm: LuauVM) -> int:
return 1
static func string_trim_handler(vm: LuauVM) -> int:
var subject: String = vm.luaL_checkstring(1)
var trimmed = subject.strip_edges()
vm.lua_pushstring(trimmed)
return 1
static func setup_regex_api(vm: LuauVM) -> void:
vm.lua_newtable()
@@ -139,4 +145,7 @@ static func setup_regex_api(vm: LuauVM) -> void:
vm.lua_pushcallable(string_replace_all_handler, "string.replaceAll")
vm.lua_setfield(-2, "replaceAll")
vm.lua_pushcallable(string_trim_handler, "string.trim")
vm.lua_setfield(-2, "trim")
vm.lua_pop(1)