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;
60bool isValidUTF8(
const char* s);
61bool isValidUTF8(
const std::string& s);
65long long parseLL(
const char* n);
69std::string toUtf8String(
const std::wstring& wide);
71std::wstring toWideString(
const char* s);
73bool writeUtf8ToWindowsConsole(
const char* utf8String,
unsigned int utf8StringSize);
78inline std::string toNativeString(
const char* s) {
82inline std::wstring toNativeString(
const char* s) {
83 return toWideString(s);
87class 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 {
std::string next()
get next split string fragment
StringSplitter(const char *big, const char *splitter)
Definition text.h:33
bool more() const
Definition text.h:36
the main MongoDB namespace
Definition bulk_operation_builder.h:24
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,...