1 |
|
2 |
#include "utils/Trim.hpp" |
3 |
namespace oopse { |
4 |
|
5 |
void trimLeft(std::string& str) { |
6 |
trimLeftIf(str, std::isspace); |
7 |
} |
8 |
|
9 |
void trimRight(std::string& str) { |
10 |
trimRightIf(str, std::isspace); |
11 |
} |
12 |
|
13 |
void trim(std::string& str) { |
14 |
trimIf(str, std::isspace); |
15 |
} |
16 |
|
17 |
std::string trimLeftCopy(const std::string& input) { |
18 |
return trimLeftCopyIf(input, std::isspace); |
19 |
} |
20 |
|
21 |
std::string trimRightCopy(const std::string& input) { |
22 |
return trimRightCopyIf(input, std::isspace); |
23 |
} |
24 |
|
25 |
std::string trimCopy(const std::string& input) { |
26 |
return trimCopyIf(input, std::isspace); |
27 |
} |
28 |
|
29 |
} |