24#include "mongo/base/disallow_copying.h"
34 : _big( big ) , _splitter( splitter ) {
38 bool more()
const {
return _big[0] != 0; }
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) {
return s; }
80 inline std::wstring toNativeString(
const char *s) {
return toWideString(s); }
83 class WindowsCommandLine {
84 MONGO_DISALLOW_COPYING(WindowsCommandLine);
89 WindowsCommandLine(
int argc,
wchar_t* argvW[],
wchar_t* envpW[]);
90 ~WindowsCommandLine();
91 char** argv(
void)
const {
return _argv; };
92 char** envp(
void)
const {
return _envp; };
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:38
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,...