weh
This commit is contained in:
parent
bd402f57f5
commit
3ea546fe08
166 changed files with 18360 additions and 18199 deletions
|
@ -9,8 +9,10 @@ namespace rfl {
|
|||
namespace strings {
|
||||
|
||||
/// Joins a string using the delimiter
|
||||
inline std::string join(const std::string& _delimiter,
|
||||
const std::vector<std::string>& _strings) {
|
||||
inline std::string join(
|
||||
const std::string& _delimiter,
|
||||
const std::vector<std::string>& _strings
|
||||
) {
|
||||
if (_strings.size() == 0) { return ""; }
|
||||
auto res = _strings[0];
|
||||
for (size_t i = 1; i < _strings.size(); ++i) {
|
||||
|
|
|
@ -8,9 +8,11 @@ namespace rfl {
|
|||
namespace internal {
|
||||
namespace strings {
|
||||
|
||||
inline std::string replace_all(const std::string& _str,
|
||||
const std::string& _from,
|
||||
const std::string& _to) {
|
||||
inline std::string replace_all(
|
||||
const std::string& _str,
|
||||
const std::string& _from,
|
||||
const std::string& _to
|
||||
) {
|
||||
auto str = _str;
|
||||
|
||||
size_t pos = 0;
|
||||
|
|
|
@ -9,10 +9,10 @@ namespace rfl {
|
|||
namespace strings {
|
||||
|
||||
/// Splits a string alongside the delimiter
|
||||
inline std::vector<std::string> split(const std::string& _str,
|
||||
const std::string& _delimiter) {
|
||||
auto str = _str;
|
||||
size_t pos = 0;
|
||||
inline std::vector<std::string>
|
||||
split(const std::string& _str, const std::string& _delimiter) {
|
||||
auto str = _str;
|
||||
size_t pos = 0;
|
||||
std::vector<std::string> result;
|
||||
while ((pos = str.find(_delimiter)) != std::string::npos) {
|
||||
result.emplace_back(str.substr(0, pos));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue