summaryrefslogtreecommitdiff
path: root/src/mongo/shell
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-04-09 17:29:16 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-04-11 17:01:01 -0400
commit96ad39f93f670e9e09a1e430898e3b9a8bd70f54 (patch)
treeb7a7507e3a25ea36683b8629c4b512abbea53c60 /src/mongo/shell
parent7dc8b27f5c34821d24a6751e68da4c62b4545495 (diff)
downloadmongo-96ad39f93f670e9e09a1e430898e3b9a8bd70f54.tar.gz
SERVER-40476 merge contents of utils/stringutils into utils/str.
Diffstat (limited to 'src/mongo/shell')
-rw-r--r--src/mongo/shell/dbshell.cpp10
-rw-r--r--src/mongo/shell/shell_utils_launcher.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp
index 46cf674fea5..f80ac260ec6 100644
--- a/src/mongo/shell/dbshell.cpp
+++ b/src/mongo/shell/dbshell.cpp
@@ -68,7 +68,7 @@
#include "mongo/util/signal_handlers.h"
#include "mongo/util/stacktrace.h"
#include "mongo/util/startup_test.h"
-#include "mongo/util/stringutils.h"
+#include "mongo/util/str.h"
#include "mongo/util/text.h"
#include "mongo/util/version.h"
@@ -844,7 +844,7 @@ int _main(int argc, char* argv[], char** envp) {
// Parse the output of getURIFromArgs which will determine if --host passed in a URI
MongoURI parsedURI;
parsedURI = uassertStatusOK(MongoURI::parse(getURIFromArgs(
- cmdlineURI, escape(shellGlobalParams.dbhost), escape(shellGlobalParams.port))));
+ cmdlineURI, str::escape(shellGlobalParams.dbhost), str::escape(shellGlobalParams.port))));
// TODO: add in all of the relevant shellGlobalParams to parsedURI
parsedURI.setOptionIfNecessary("compressors"s, shellGlobalParams.networkMessageCompressors);
@@ -855,14 +855,14 @@ int _main(int argc, char* argv[], char** envp) {
if (const auto authMechanisms = parsedURI.getOption("authMechanism")) {
std::stringstream ss;
- ss << "DB.prototype._defaultAuthenticationMechanism = \"" << escape(authMechanisms.get())
- << "\";" << std::endl;
+ ss << "DB.prototype._defaultAuthenticationMechanism = \""
+ << str::escape(authMechanisms.get()) << "\";" << std::endl;
mongo::shell_utils::dbConnect += ss.str();
}
if (const auto gssapiServiveName = parsedURI.getOption("gssapiServiceName")) {
std::stringstream ss;
- ss << "DB.prototype._defaultGssapiServiceName = \"" << escape(gssapiServiveName.get())
+ ss << "DB.prototype._defaultGssapiServiceName = \"" << str::escape(gssapiServiveName.get())
<< "\";" << std::endl;
mongo::shell_utils::dbConnect += ss.str();
}
diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp
index 3b3d128335e..34aa7c61d7e 100644
--- a/src/mongo/shell/shell_utils_launcher.cpp
+++ b/src/mongo/shell/shell_utils_launcher.cpp
@@ -71,7 +71,7 @@
#include "mongo/util/quick_exit.h"
#include "mongo/util/scopeguard.h"
#include "mongo/util/signal_win32.h"
-#include "mongo/util/stringutils.h"
+#include "mongo/util/str.h"
#include "mongo/util/text.h"
#ifndef _WIN32
@@ -525,7 +525,7 @@ boost::filesystem::path ProgramRunner::findProgram(const string& prog) {
// PATH entries are separated by colons. Per POSIX 2013, there is no way to escape a colon in
// an entry.
- splitStringDelim(path, &pathEntries, ':');
+ str::splitStringDelim(path, &pathEntries, ':');
for (const std::string& pathEntry : pathEntries) {
boost::filesystem::path potentialBinary = boost::filesystem::path(pathEntry) / p;