mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-10-31 23:55:06 -04:00
5dda5762ba
subrepo: subdir: "ZAPDTR" merged: "a53a53ea4" upstream: origin: "https://github.com/HarbourMasters/ZAPDTR.git" branch: "master" commit: "a53a53ea4" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <algorithm>
|
|
#include <cstdarg>
|
|
#include <cstring>
|
|
#include <numeric>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class StringHelper
|
|
{
|
|
public:
|
|
static std::vector<std::string> Split(std::string 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 IEquals(const std::string& a, const std::string& b);
|
|
}; |