24 #include "mongo/base/disallow_copying.h"
33 StringSplitter(
const char* big,
const char* splitter) : _big(big), _splitter(splitter) {}
43 void split(std::vector<std::string>& l);
45 std::vector<std::string> split();
47 static std::vector<std::string> split(
const std::string& big,
const std::string& splitter);
49 static std::string join(
const std::vector<std::string>& l,
const std::string& split);
53 const char* _splitter;
60 bool isValidUTF8(
const char* s);
61 bool isValidUTF8(
const std::string& s);
65 long long parseLL(
const char* n);
69 std::string toUtf8String(
const std::wstring& wide);
71 std::wstring toWideString(
const char* s);
73 bool writeUtf8ToWindowsConsole(
const char* utf8String,
unsigned int utf8StringSize);
76 #if !defined(_UNICODE)
78 inline std::string toNativeString(
const char* s) {
82 inline std::wstring toNativeString(
const char* s) {
83 return toWideString(s);
87 class WindowsCommandLine {
88 MONGO_DISALLOW_COPYING(WindowsCommandLine);
93 WindowsCommandLine(
int argc,
wchar_t* argvW[],
wchar_t* envpW[]);
94 ~WindowsCommandLine();
95 char** argv(
void)
const {
98 char** envp(
void)
const {
103 #endif // #if defined(_WIN32)
std::string next()
get next split string fragment
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
StringSplitter(const char *big, const char *splitter)
Definition: text.h:33
bool more() const
Definition: text.h:36
std::string constructUtf8WindowsCommandLine(const std::vector< std::string > &argv)
Construct a Windows command line string, UTF-8 encoded, from a vector of UTF-8 arguments, "argv".