10#include <boost/algorithm/string.hpp>
23 template <
typename StringT>
29 template <
typename Range1T,
typename Range2T>
30 static bool StartsWith(
const Range1T &input,
const Range2T &test) {
31 return boost::algorithm::istarts_with(input, test);
34 template <
typename Range1T,
typename Range2T>
35 static bool EndsWith(
const Range1T &input,
const Range2T &test) {
36 return boost::algorithm::iends_with(input, test);
39 template <
typename WritableRangeT>
40 static void ToLower(WritableRangeT &str) {
41 boost::algorithm::to_lower(str);
45 template <
typename SequenceT>
47 return boost::algorithm::to_lower_copy(str);
51 template <
typename WritableRangeT>
52 static void ToUpper(WritableRangeT &str) {
53 boost::algorithm::to_upper(str);
56 template <
typename SequenceT>
58 return boost::algorithm::to_upper_copy(str);
62 template <
typename WritableRangeT>
63 static void Trim(WritableRangeT &str) {
64 boost::algorithm::trim(str);
68 template <
typename SequenceT>
70 return boost::algorithm::trim_copy(str);
74 template<
typename Container,
typename Range1T,
typename Range2T>
75 static void Split(Container &destination,
const Range1T &str,
const Range2T &separators) {
76 boost::split(destination, str, boost::is_any_of(separators));
82 static bool Match(
const char *str,
const char *wildcard_pattern);
87 template <
typename String1T,
typename String2T>
88 static bool Match(
const String1T &str,
const String2T &wildcard_pattern) {
static void ToUpper(WritableRangeT &str)
static bool Match(const char *str, const char *wildcard_pattern)
Match str with the Unix shell-style wildcard_pattern.
static void Split(Container &destination, const Range1T &str, const Range2T &separators)
static bool Match(const String1T &str, const String2T &wildcard_pattern)
Match str with the Unix shell-style wildcard_pattern.
static const char * ToConstCharPtr(const char *str)
static auto ToLowerCopy(const SequenceT &str)
static auto ToUpperCopy(const SequenceT &str)
static auto TrimCopy(const SequenceT &str)
static const char * ToConstCharPtr(const StringT &str)
static bool EndsWith(const Range1T &input, const Range2T &test)
static void Trim(WritableRangeT &str)
static void ToLower(WritableRangeT &str)
static bool StartsWith(const Range1T &input, const Range2T &test)