25 #include <boost/scoped_array.hpp>
27 #include "mongo/base/string_data.h"
34 void splitStringDelim(
const std::string& str, std::vector<std::string>* res,
char delim);
36 void joinStringDelim(
const std::vector<std::string>& strs, std::string* res,
char delim);
38 inline std::string tolowerString(StringData input) {
39 std::string::size_type sz = input.size();
41 boost::scoped_array<char> line(
new char[sz + 1]);
42 char* copy = line.get();
44 for (std::string::size_type i = 0; i < sz; i++) {
46 copy[i] = (char)tolower((
int)c);
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
Functor for combining lexical and numeric comparisons.
Definition: stringutils.h:53
static int cmp(const StringData &s1, const StringData &s2, bool lexOnly)
Non numeric characters are compared lexicographically; numeric substrings are compared numerically; d...