128 |
|
* Remove all leading spaces in-place. |
129 |
|
* @param str An input sequence |
130 |
|
*/ |
131 |
< |
void trimLeft(std::string& str) { |
132 |
< |
trimLeftIf(str, std::isspace); |
133 |
< |
} |
131 |
> |
void trimLeft(std::string& str); |
132 |
|
|
133 |
|
/** |
134 |
|
* Remove all trailing spaces in-place. |
135 |
|
* @param str An input sequence |
136 |
|
*/ |
137 |
< |
void trimRight(std::string& str) { |
140 |
< |
trimRightIf(str, std::isspace); |
141 |
< |
} |
137 |
> |
void trimRight(std::string& str); |
138 |
|
|
139 |
|
/** |
140 |
|
*Remove all leading and trailing spaces in-place |
141 |
|
* @param str An input sequence |
142 |
|
*/ |
143 |
< |
void trim(std::string& str) { |
148 |
< |
trimIf(str, std::isspace); |
149 |
< |
} |
143 |
> |
void trim(std::string& str); |
144 |
|
|
145 |
|
/** |
146 |
|
* Remove all leading spaces from the input. |
147 |
|
* @return A trimmed copy of the input |
148 |
|
* @param input An input sequence |
149 |
|
*/ |
150 |
< |
std::string trimLeftCopy(const std::string& input) { |
157 |
< |
return trimLeftCopyIf(input, std::isspace); |
158 |
< |
} |
150 |
> |
std::string trimLeftCopy(const std::string& input); |
151 |
|
|
152 |
|
/** |
153 |
|
* Remove all trailing spaces from the input. |
154 |
|
* @return A trimmed copy of the input |
155 |
|
* @param input An input sequence |
156 |
|
*/ |
157 |
< |
std::string trimRightCopy(const std::string& input) { |
166 |
< |
return trimRightCopyIf(input, std::isspace); |
167 |
< |
} |
157 |
> |
std::string trimRightCopy(const std::string& input); |
158 |
|
|
159 |
|
/** |
160 |
|
*Remove all leading and trailing spaces from the input. |
161 |
|
* @return A trimmed copy of the input |
162 |
|
* @param input An input sequence |
163 |
|
*/ |
164 |
< |
std::string trimCopy(const std::string& input) { |
175 |
< |
return trimCopyIf(input, std::isspace); |
176 |
< |
} |
164 |
> |
std::string trimCopy(const std::string& input); |
165 |
|
|
166 |
|
}//end namespace oopse |
167 |
|
#endif //UTILS_TRIM_HPP |