diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2024-11-21 21:55:34 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2024-11-21 21:55:34 -0600 |
| commit | 79e1721ebcc450959e3483cb70d5559bfaba6dcf (patch) | |
| tree | a04056e5c5198521f0363a54dd0ece5e27acd862 /src/utils/StringHelper.h | |
| parent | a9662a158ff7764ecbefd1b88280d3854f3c4fea (diff) | |
Added sample rate when exporting
Diffstat (limited to 'src/utils/StringHelper.h')
| -rw-r--r-- | src/utils/StringHelper.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/utils/StringHelper.h b/src/utils/StringHelper.h new file mode 100644 index 0000000..2fad9f1 --- /dev/null +++ b/src/utils/StringHelper.h @@ -0,0 +1,32 @@ +#pragma once + +#include <algorithm> +#include <cstdarg> +#include <cstring> +#include <numeric> +#include <string> +#include <string_view> +#include <vector> +#include <cstdint> + +class StringHelper { + public: + static std::vector<std::string> Split(std::string s, const std::string& delimiter); + static std::vector<std::string_view> Split(std::string_view s, const std::string& delimiter); + static std::string Strip(std::string s, const std::string& delimiter); + static std::string Replace(std::string str, const std::string& from, const std::string& to); + static void ReplaceOriginal(std::string& str, const std::string& from, const std::string& to); + static bool StartsWith(const std::string& s, const std::string& input); + static bool Contains(const std::string& s, const std::string& input); + static bool EndsWith(const std::string& s, const std::string& input); + static std::string Sprintf(const char* format, ...); + static std::string Implode(std::vector<std::string>& elements, const char* const separator); + static int64_t StrToL(const std::string& str, int32_t base = 10); + static std::string BoolStr(bool b); + static bool HasOnlyDigits(const std::string& str); + static bool IsValidHex(std::string_view str); + static bool IsValidHex(const std::string& str); + static bool IsValidOffset(std::string_view str); + static bool IsValidOffset(const std::string& str); + static bool IEquals(const std::string& a, const std::string& b); +};
\ No newline at end of file |
