diff options
| author | ruki <[email protected]> | 2019-07-17 22:38:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-07-17 09:50:12 +0800 |
| commit | 7138d5770975053ad4fe60f1d8bdd5e4c774fe5b (patch) | |
| tree | a6ca7509a4522337687e22f586f786c8c8395208 /core/src/xmake/machine.c | |
| parent | 54386754982c5580e9d351484eabd45ebfd20c48 (diff) | |
optimize string.trim using c implemention
Diffstat (limited to 'core/src/xmake/machine.c')
| -rw-r--r-- | core/src/xmake/machine.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c index 77661a445..ff0758882 100644 --- a/core/src/xmake/machine.c +++ b/core/src/xmake/machine.c @@ -129,6 +129,7 @@ tb_int_t xm_winos_registry_query(lua_State* lua); #endif // the string functions +tb_int_t xm_string_trim(lua_State* lua); tb_int_t xm_string_convert(lua_State* lua); tb_int_t xm_string_endswith(lua_State* lua); tb_int_t xm_string_startswith(lua_State* lua); @@ -263,7 +264,8 @@ static luaL_Reg const g_hash_functions[] = // the string functions static luaL_Reg const g_string_functions[] = { - { "convert", xm_string_convert } + { "trim", xm_string_trim } +, { "convert", xm_string_convert } , { "endswith", xm_string_endswith } , { "startswith", xm_string_startswith } , { tb_null, tb_null } |
