| 36 | }; |
| 37 | |
| 38 | void replaceAll(skr::stl_u8string& str, const skr::stl_u8string_view& from, const skr::stl_u8string_view& to) { |
| 39 | if(from.empty()) |
| 40 | return; |
| 41 | size_t start_pos = 0; |
| 42 | while((start_pos = skr::stl_u8string_view(str).find(from, start_pos)) != std::string::npos) { |
| 43 | str.replace(start_pos, from.length(), to.data(), to.length()); |
| 44 | start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx' |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | static skr::FlatHashMap<lua_State*, void*> ExtraSpace; |
| 49 | void** lua_getextraspace(lua_State* L) |
no test coverage detected