FOSSredder 0.5.0
Loading...
Searching...
No Matches
StringUtils.h
Go to the documentation of this file.
1
6
7#pragma once
8
9#include <string>
10#include <vector>
11
12namespace core::utils {
13
17std::string trim(std::string s);
18
22std::string lowerAscii(std::string s);
23
28std::string collapseWhitespace(std::string s);
29
33std::vector<std::string> splitWhitespace(const std::string& s);
34
35} // namespace core::utils
std::vector< std::string > splitWhitespace(const std::string &s)
Splits a string on ASCII whitespace.
std::string collapseWhitespace(std::string s)
Collapses consecutive whitespace to single spaces and trims the result.
std::string lowerAscii(std::string s)
Converts ASCII letters in a string to lowercase.
std::string trim(std::string s)
Removes leading and trailing ASCII whitespace from a string.