14#include <lagrange/api.h>
15#include <lagrange/utils/fmt/format.h>
38LA_CORE_API std::vector<std::string>
string_split(
const std::string& str,
char delimiter);
50LA_CORE_API
bool starts_with(std::string_view str, std::string_view prefix);
62LA_CORE_API
bool ends_with(std::string_view str, std::string_view suffix);
73LA_CORE_API std::string
to_lower(std::string str);
84LA_CORE_API std::string
to_upper(std::string str);
98template <
typename... Args>
102#ifdef SPDLOG_USE_STD_FORMAT
103 return std::format(format, std::forward<Args>(args)...);
104#elif FMT_VERSION >= 90100
105 return fmt::format(fmt::runtime(format), std::forward<Args>(args)...);
107 return fmt::format(format, std::forward<Args>(args)...);
LA_CORE_API std::string to_lower(std::string str)
Convert a string to lowercase.
Definition strings.cpp:43
LA_CORE_API std::string to_upper(std::string str)
Convert a string to uppercase.
Definition strings.cpp:51
LA_CORE_API bool ends_with(std::string_view str, std::string_view suffix)
Checks if the string ends with the given suffix.
Definition strings.cpp:31
std::string string_format(lagrange::format_string< Args... > format, Args &&... args)
Format args according to the format string fmt, and return the result as a string.
Definition strings.h:99
LA_CORE_API std::vector< std::string > string_split(const std::string &str, char delimiter)
Split a std::string using a prescribed delimiter.
Definition strings.cpp:20
LA_CORE_API bool starts_with(std::string_view str, std::string_view prefix)
Checks if the string begins with the given prefix.
Definition strings.cpp:38
Main namespace for Lagrange.
Definition project.cpp:27