8#include <entt/locator/locator.hpp>
20 auto& lua = entt::locator<sol::state>::value();
31 auto uuid_type = lua.new_usertype<
UUID>(
"UUID", sol::constructors<UUID()>());
static void inject_utils() noexcept
Injects misc galaxy utils into Lua.
Contains a 128bit randomly generated UUID, along with helper functions.
const std::string & str() const noexcept
Get the UUID as a string.
std::size_t hash() noexcept
Get the UUID as a hash.
std::string rtrim(std::string input) noexcept
Trim string from start.
std::string replace_all(std::string input, std::string_view to_replace, std::string_view replace_with) noexcept
Replaces all occurrences of a string.
std::vector< std::string > split(std::string_view input, std::string_view delim) noexcept
Split a string based on a delimiter.
std::string ltrim(std::string input) noexcept
Trim string from end.
bool begins_with(const std::string &input, const std::string &find) noexcept
Check if string begins with another string.
std::string trim(std::string input) noexcept
Trim both ends of string.
std::string make_single_spaced(std::string input) noexcept
Make a string single spaced.
std::string replace_first(std::string input, std::string_view to_replace, std::string_view replace_with) noexcept
Replace first occurrence of a string.