kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [4/6] kudu git commit: remove 'using std::...' and other from header files
Date Thu, 10 Aug 2017 00:05:10 GMT
http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/join.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/join.h b/src/kudu/gutil/strings/join.h
index 4369c4c..1afc1f0 100644
--- a/src/kudu/gutil/strings/join.h
+++ b/src/kudu/gutil/strings/join.h
@@ -16,21 +16,10 @@ using __gnu_cxx::hash_map;  // Not used in this file.
 using __gnu_cxx::hash;
 using __gnu_cxx::hash_set;  // Not used in this file.
 #include <iterator>
-using std::back_insert_iterator;
-using std::iterator_traits;
 #include <map>
-using std::map;
-using std::multimap;
-#include <set>
-using std::multiset;
-using std::set;
 #include <string>
-using std::string;
 #include <utility>
-using std::make_pair;
-using std::pair;
 #include <vector>
-using std::vector;
 
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
@@ -53,7 +42,7 @@ using std::vector;
 //    If result_length_p is not NULL, it will contain the length of the
 //    result string (not including the trailing '\0').
 // ----------------------------------------------------------------------
-char* JoinUsing(const vector<const char*>& components,
+char* JoinUsing(const std::vector<const char*>& components,
                 const char* delim,
                 int*  result_length_p);
 
@@ -67,7 +56,7 @@ char* JoinUsing(const vector<const char*>& components,
 //    If result_length_p is not NULL, it will contain the length of the
 //    result string (not including the trailing '\0').
 // ----------------------------------------------------------------------
-char* JoinUsingToBuffer(const vector<const char*>& components,
+char* JoinUsingToBuffer(const std::vector<const char*>& components,
                         const char* delim,
                         int result_buffer_size,
                         char* result_buffer,
@@ -100,18 +89,18 @@ char* JoinUsingToBuffer(const vector<const char*>& components,
 template <class CONTAINER>
 void JoinStrings(const CONTAINER& components,
                  const StringPiece& delim,
-                 string* result);
+                 std::string* result);
 template <class CONTAINER>
-string JoinStrings(const CONTAINER& components,
+std::string JoinStrings(const CONTAINER& components,
                    const StringPiece& delim);
 
 template <class ITERATOR>
 void JoinStringsIterator(const ITERATOR& start,
                          const ITERATOR& end,
                          const StringPiece& delim,
-                         string* result);
+                         std::string* result);
 template <class ITERATOR>
-string JoinStringsIterator(const ITERATOR& start,
+std::string JoinStringsIterator(const ITERATOR& start,
                            const ITERATOR& end,
                            const StringPiece& delim);
 
@@ -120,7 +109,7 @@ template<typename ITERATOR>
 void JoinKeysIterator(const ITERATOR& start,
                       const ITERATOR& end,
                       const StringPiece& delim,
-                      string *result) {
+                      std::string *result) {
   result->clear();
   for (ITERATOR iter = start; iter != end; ++iter) {
     if (iter == start) {
@@ -132,10 +121,10 @@ void JoinKeysIterator(const ITERATOR& start,
 }
 
 template <typename ITERATOR>
-string JoinKeysIterator(const ITERATOR& start,
+std::string JoinKeysIterator(const ITERATOR& start,
                         const ITERATOR& end,
                         const StringPiece& delim) {
-  string result;
+  std::string result;
   JoinKeysIterator(start, end, delim, &result);
   return result;
 }
@@ -146,7 +135,7 @@ void JoinKeysAndValuesIterator(const ITERATOR& start,
                                const ITERATOR& end,
                                const StringPiece& intra_delim,
                                const StringPiece& inter_delim,
-                               string *result) {
+                               std::string *result) {
   result->clear();
   for (ITERATOR iter = start; iter != end; ++iter) {
     if (iter == start) {
@@ -158,27 +147,27 @@ void JoinKeysAndValuesIterator(const ITERATOR& start,
 }
 
 template <typename ITERATOR>
-string JoinKeysAndValuesIterator(const ITERATOR& start,
+std::string JoinKeysAndValuesIterator(const ITERATOR& start,
                                  const ITERATOR& end,
                                  const StringPiece& intra_delim,
                                  const StringPiece& inter_delim) {
-  string result;
+  std::string result;
   JoinKeysAndValuesIterator(start, end, intra_delim, inter_delim, &result);
   return result;
 }
 
-void JoinStringsInArray(string const* const* components,
+void JoinStringsInArray(std::string const* const* components,
                         int num_components,
                         const char* delim,
-                        string* result);
-void JoinStringsInArray(string const* components,
+                        std::string* result);
+void JoinStringsInArray(std::string const* components,
                         int num_components,
                         const char* delim,
-                        string* result);
-string JoinStringsInArray(string const* const* components,
+                        std::string* result);
+std::string JoinStringsInArray(std::string const* const* components,
                           int num_components,
                           const char* delim);
-string JoinStringsInArray(string const* components,
+std::string JoinStringsInArray(std::string const* components,
                           int num_components,
                           const char* delim);
 
@@ -188,14 +177,14 @@ string JoinStringsInArray(string const* components,
 template <class CONTAINER>
 inline void JoinStrings(const CONTAINER& components,
                         const StringPiece& delim,
-                        string* result) {
+                        std::string* result) {
   JoinStringsIterator(components.begin(), components.end(), delim, result);
 }
 
 template <class CONTAINER>
-inline string JoinStrings(const CONTAINER& components,
+inline std::string JoinStrings(const CONTAINER& components,
                           const StringPiece& delim) {
-  string result;
+  std::string result;
   JoinStrings(components, delim, &result);
   return result;
 }
@@ -203,10 +192,10 @@ inline string JoinStrings(const CONTAINER& components,
 // Join the strings produced by calling 'functor' on each element of
 // 'components'.
 template<class CONTAINER, typename FUNC>
-string JoinMapped(const CONTAINER& components,
+std::string JoinMapped(const CONTAINER& components,
                   const FUNC& functor,
                   const StringPiece& delim) {
-  string result;
+  std::string result;
   for (typename CONTAINER::const_iterator iter = components.begin();
       iter != components.end();
       iter++) {
@@ -222,7 +211,7 @@ template <class ITERATOR>
 void JoinStringsIterator(const ITERATOR& start,
                          const ITERATOR& end,
                          const StringPiece& delim,
-                         string* result) {
+                         std::string* result) {
   result->clear();
 
   // Precompute resulting length so we can reserve() memory in one shot.
@@ -244,26 +233,26 @@ void JoinStringsIterator(const ITERATOR& start,
 }
 
 template <class ITERATOR>
-inline string JoinStringsIterator(const ITERATOR& start,
-                                  const ITERATOR& end,
-                                  const StringPiece& delim) {
-  string result;
+inline std::string JoinStringsIterator(const ITERATOR& start,
+                                       const ITERATOR& end,
+                                       const StringPiece& delim) {
+  std::string result;
   JoinStringsIterator(start, end, delim, &result);
   return result;
 }
 
-inline string JoinStringsInArray(string const* const* components,
-                                 int num_components,
-                                 const char* delim) {
-  string result;
+inline std::string JoinStringsInArray(std::string const* const* components,
+                                      int num_components,
+                                      const char* delim) {
+  std::string result;
   JoinStringsInArray(components, num_components, delim, &result);
   return result;
 }
 
-inline string JoinStringsInArray(string const* components,
-                                 int num_components,
-                                 const char* delim) {
-  string result;
+inline std::string JoinStringsInArray(std::string const* components,
+                                      int num_components,
+                                      const char* delim) {
+  std::string result;
   JoinStringsInArray(components, num_components, delim, &result);
   return result;
 }
@@ -279,21 +268,22 @@ inline string JoinStringsInArray(string const* components,
 //    as the last argument).
 // ----------------------------------------------------------------------
 
-void JoinMapKeysAndValues(const map<string, string>& components,
+void JoinMapKeysAndValues(const std::map<std::string, std::string>& components,
                           const StringPiece& intra_delim,
                           const StringPiece& inter_delim,
-                          string* result);
-void JoinVectorKeysAndValues(const vector< pair<string, string> >& components,
-                             const StringPiece& intra_delim,
-                             const StringPiece& inter_delim,
-                             string* result);
+                          std::string* result);
+void JoinVectorKeysAndValues(
+    const std::vector< std::pair<std::string, std::string> >& components,
+    const StringPiece& intra_delim,
+    const StringPiece& inter_delim,
+    std::string* result);
 
 // DEPRECATED(jyrki): use JoinKeysAndValuesIterator directly.
 template<typename T>
 void JoinHashMapKeysAndValues(const T& container,
                               const StringPiece& intra_delim,
                               const StringPiece& inter_delim,
-                              string* result) {
+                              std::string* result) {
   JoinKeysAndValuesIterator(container.begin(), container.end(),
                             intra_delim, inter_delim,
                             result);
@@ -319,11 +309,11 @@ void JoinHashMapKeysAndValues(const T& container,
 //    A convenience wrapper around JoinCSVLineWithDelimiter which uses
 //    ',' as the delimiter.
 // ----------------------------------------------------------------------
-void JoinCSVLine(const vector<string>& original_cols, string* output);
-string JoinCSVLine(const vector<string>& original_cols);
-void JoinCSVLineWithDelimiter(const vector<string>& original_cols,
+void JoinCSVLine(const std::vector<std::string>& original_cols, std::string* output);
+std::string JoinCSVLine(const std::vector<std::string>& original_cols);
+void JoinCSVLineWithDelimiter(const std::vector<std::string>& original_cols,
                               char delimiter,
-                              string* output);
+                              std::string* output);
 
 // ----------------------------------------------------------------------
 // JoinElements()
@@ -340,7 +330,7 @@ template <class ITERATOR>
 void JoinElementsIterator(ITERATOR first,
                           ITERATOR last,
                           StringPiece delim,
-                          string* result) {
+                          std::string* result) {
   result->clear();
   for (ITERATOR it = first; it != last; ++it) {
     if (it != first) {
@@ -351,10 +341,10 @@ void JoinElementsIterator(ITERATOR first,
 }
 
 template <class ITERATOR>
-string JoinElementsIterator(ITERATOR first,
+std::string JoinElementsIterator(ITERATOR first,
                             ITERATOR last,
                             StringPiece delim) {
-  string result;
+  std::string result;
   JoinElementsIterator(first, last, delim, &result);
   return result;
 }
@@ -362,13 +352,13 @@ string JoinElementsIterator(ITERATOR first,
 template <class CONTAINER>
 inline void JoinElements(const CONTAINER& components,
                          StringPiece delim,
-                         string* result) {
+                         std::string* result) {
   JoinElementsIterator(components.begin(), components.end(), delim, result);
 }
 
 template <class CONTAINER>
-inline string JoinElements(const CONTAINER& components, StringPiece delim) {
-  string result;
+inline std::string JoinElements(const CONTAINER& components, StringPiece delim) {
+  std::string result;
   JoinElements(components, delim, &result);
   return result;
 }
@@ -376,12 +366,12 @@ inline string JoinElements(const CONTAINER& components, StringPiece delim) {
 template <class CONTAINER>
 void JoinInts(const CONTAINER& components,
               const char* delim,
-              string* result) {
+              std::string* result) {
   JoinElements(components, delim, result);
 }
 
 template <class CONTAINER>
-inline string JoinInts(const CONTAINER& components,
+inline std::string JoinInts(const CONTAINER& components,
                        const char* delim) {
   return JoinElements(components, delim);
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/numbers.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/numbers.h b/src/kudu/gutil/strings/numbers.h
index e9f5c1a..b0ec224 100644
--- a/src/kudu/gutil/strings/numbers.h
+++ b/src/kudu/gutil/strings/numbers.h
@@ -11,14 +11,8 @@
 #include <string.h>
 #include <time.h>
 #include <functional>
-using std::binary_function;
-using std::less;
 #include <limits>
-using std::numeric_limits;
 #include <string>
-using std::string;
-#include <vector>
-using std::vector;
 
 #include "kudu/gutil/int128.h"
 #include "kudu/gutil/integral_types.h"
@@ -32,10 +26,10 @@ using std::vector;
  * @{ */
 
 // Convert a fingerprint to 16 hex digits.
-string FpToString(Fprint fp);
+std::string FpToString(Fprint fp);
 
 // Formats a uint128 as a 32-digit hex string.
-string Uint128ToHexString(uint128 ui128);
+std::string Uint128ToHexString(uint128 ui128);
 
 // Convert strings to numeric values, with strict error checking.
 // Leading and trailing spaces are allowed.
@@ -52,12 +46,12 @@ bool safe_strtou64(const char* str, uint64* value);
 bool safe_strtof(const char* str, float* value);
 bool safe_strtod(const char* str, double* value);
 
-bool safe_strto32(const string& str, int32* value);
-bool safe_strto64(const string& str, int64* value);
-bool safe_strtou32(const string& str, uint32* value);
-bool safe_strtou64(const string& str, uint64* value);
-bool safe_strtof(const string& str, float* value);
-bool safe_strtod(const string& str, double* value);
+bool safe_strto32(const std::string& str, int32* value);
+bool safe_strto64(const std::string& str, int64* value);
+bool safe_strtou32(const std::string& str, uint32* value);
+bool safe_strtou64(const std::string& str, uint64* value);
+bool safe_strtof(const std::string& str, float* value);
+bool safe_strtod(const std::string& str, double* value);
 
 // Parses buffer_size many characters from startptr into value.
 bool safe_strto32(const char* startptr, int buffer_size, int32* value);
@@ -71,10 +65,10 @@ bool safe_strto64_base(const char* str, int64* value, int base);
 bool safe_strtou32_base(const char* str, uint32* value, int base);
 bool safe_strtou64_base(const char* str, uint64* value, int base);
 
-bool safe_strto32_base(const string& str, int32* value, int base);
-bool safe_strto64_base(const string& str, int64* value, int base);
-bool safe_strtou32_base(const string& str, uint32* value, int base);
-bool safe_strtou64_base(const string& str, uint64* value, int base);
+bool safe_strto32_base(const std::string& str, int32* value, int base);
+bool safe_strto64_base(const std::string& str, int64* value, int base);
+bool safe_strtou32_base(const std::string& str, uint32* value, int base);
+bool safe_strtou64_base(const std::string& str, uint64* value, int base);
 
 bool safe_strto32_base(const char* startptr, int buffer_size,
                        int32* value, int base);
@@ -92,7 +86,7 @@ size_t u64tostr_base36(uint64 number, size_t buf_size, char* buffer);
 
 // Similar to atoi(s), except s could be like "16k", "32M", "2G", "4t".
 uint64 atoi_kmgt(const char* s);
-inline uint64 atoi_kmgt(const string& s) { return atoi_kmgt(s.c_str()); }
+inline uint64 atoi_kmgt(const std::string& s) { return atoi_kmgt(s.c_str()); }
 
 // ----------------------------------------------------------------------
 // FastIntToBuffer()
@@ -195,7 +189,7 @@ int HexDigitsPrefix(const char* buf, int num_digits);
 // ConsumeStrayLeadingZeroes
 //    Eliminates all leading zeroes (unless the string itself is composed
 //    of nothing but zeroes, in which case one is kept: 0...0 becomes 0).
-void ConsumeStrayLeadingZeroes(string* str);
+void ConsumeStrayLeadingZeroes(std::string* str);
 
 // ----------------------------------------------------------------------
 // ParseLeadingInt32Value
@@ -206,7 +200,7 @@ void ConsumeStrayLeadingZeroes(string* str);
 //    treated as octal.  If you know it's decimal, use ParseLeadingDec32Value.
 // --------------------------------------------------------------------
 int32 ParseLeadingInt32Value(const char* str, int32 deflt);
-inline int32 ParseLeadingInt32Value(const string& str, int32 deflt) {
+inline int32 ParseLeadingInt32Value(const std::string& str, int32 deflt) {
   return ParseLeadingInt32Value(str.c_str(), deflt);
 }
 
@@ -218,7 +212,7 @@ inline int32 ParseLeadingInt32Value(const string& str, int32 deflt) {
 //    treated as octal.  If you know it's decimal, use ParseLeadingUDec32Value.
 // --------------------------------------------------------------------
 uint32 ParseLeadingUInt32Value(const char* str, uint32 deflt);
-inline uint32 ParseLeadingUInt32Value(const string& str, uint32 deflt) {
+inline uint32 ParseLeadingUInt32Value(const std::string& str, uint32 deflt) {
   return ParseLeadingUInt32Value(str.c_str(), deflt);
 }
 
@@ -232,7 +226,7 @@ inline uint32 ParseLeadingUInt32Value(const string& str, uint32 deflt) {
 //    See also: ParseLeadingDec64Value
 // --------------------------------------------------------------------
 int32 ParseLeadingDec32Value(const char* str, int32 deflt);
-inline int32 ParseLeadingDec32Value(const string& str, int32 deflt) {
+inline int32 ParseLeadingDec32Value(const std::string& str, int32 deflt) {
   return ParseLeadingDec32Value(str.c_str(), deflt);
 }
 
@@ -245,7 +239,7 @@ inline int32 ParseLeadingDec32Value(const string& str, int32 deflt) {
 //    See also: ParseLeadingUDec64Value
 // --------------------------------------------------------------------
 uint32 ParseLeadingUDec32Value(const char* str, uint32 deflt);
-inline uint32 ParseLeadingUDec32Value(const string& str, uint32 deflt) {
+inline uint32 ParseLeadingUDec32Value(const std::string& str, uint32 deflt) {
   return ParseLeadingUDec32Value(str.c_str(), deflt);
 }
 
@@ -260,23 +254,23 @@ inline uint32 ParseLeadingUDec32Value(const string& str, uint32 deflt) {
 //    valid integer is found; else returns deflt
 // --------------------------------------------------------------------
 uint64 ParseLeadingUInt64Value(const char* str, uint64 deflt);
-inline uint64 ParseLeadingUInt64Value(const string& str, uint64 deflt) {
+inline uint64 ParseLeadingUInt64Value(const std::string& str, uint64 deflt) {
   return ParseLeadingUInt64Value(str.c_str(), deflt);
 }
 int64 ParseLeadingInt64Value(const char* str, int64 deflt);
-inline int64 ParseLeadingInt64Value(const string& str, int64 deflt) {
+inline int64 ParseLeadingInt64Value(const std::string& str, int64 deflt) {
   return ParseLeadingInt64Value(str.c_str(), deflt);
 }
 uint64 ParseLeadingHex64Value(const char* str, uint64 deflt);
-inline uint64 ParseLeadingHex64Value(const string& str, uint64 deflt) {
+inline uint64 ParseLeadingHex64Value(const std::string& str, uint64 deflt) {
   return ParseLeadingHex64Value(str.c_str(), deflt);
 }
 int64 ParseLeadingDec64Value(const char* str, int64 deflt);
-inline int64 ParseLeadingDec64Value(const string& str, int64 deflt) {
+inline int64 ParseLeadingDec64Value(const std::string& str, int64 deflt) {
   return ParseLeadingDec64Value(str.c_str(), deflt);
 }
 uint64 ParseLeadingUDec64Value(const char* str, uint64 deflt);
-inline uint64 ParseLeadingUDec64Value(const string& str, uint64 deflt) {
+inline uint64 ParseLeadingUDec64Value(const std::string& str, uint64 deflt) {
   return ParseLeadingUDec64Value(str.c_str(), deflt);
 }
 
@@ -287,7 +281,7 @@ inline uint64 ParseLeadingUDec64Value(const string& str, uint64 deflt) {
 //    check if str is entirely consumed.
 // --------------------------------------------------------------------
 double ParseLeadingDoubleValue(const char* str, double deflt);
-inline double ParseLeadingDoubleValue(const string& str, double deflt) {
+inline double ParseLeadingDoubleValue(const std::string& str, double deflt) {
   return ParseLeadingDoubleValue(str.c_str(), deflt);
 }
 
@@ -299,7 +293,7 @@ inline double ParseLeadingDoubleValue(const string& str, double deflt) {
 //    0/1, false/true, no/yes, n/y
 // --------------------------------------------------------------------
 bool ParseLeadingBoolValue(const char* str, bool deflt);
-inline bool ParseLeadingBoolValue(const string& str, bool deflt) {
+inline bool ParseLeadingBoolValue(const std::string& str, bool deflt) {
   return ParseLeadingBoolValue(str.c_str(), deflt);
 }
 
@@ -337,29 +331,29 @@ bool StrictAutoDigitLessThan(const char* a, int alen,
                              const char* b, int blen);
 
 struct autodigit_less
-  : public binary_function<const string&, const string&, bool> {
-  bool operator()(const string& a, const string& b) const {
+  : public std::binary_function<const std::string&, const std::string&, bool> {
+  bool operator()(const std::string& a, const std::string& b) const {
     return AutoDigitLessThan(a.data(), a.size(), b.data(), b.size());
   }
 };
 
 struct autodigit_greater
-  : public binary_function<const string&, const string&, bool> {
-  bool operator()(const string& a, const string& b) const {
+  : public std::binary_function<const std::string&, const std::string&, bool> {
+  bool operator()(const std::string& a, const std::string& b) const {
     return AutoDigitLessThan(b.data(), b.size(), a.data(), a.size());
   }
 };
 
 struct strict_autodigit_less
-  : public binary_function<const string&, const string&, bool> {
-  bool operator()(const string& a, const string& b) const {
+  : public std::binary_function<const std::string&, const std::string&, bool> {
+  bool operator()(const std::string& a, const std::string& b) const {
     return StrictAutoDigitLessThan(a.data(), a.size(), b.data(), b.size());
   }
 };
 
 struct strict_autodigit_greater
-  : public binary_function<const string&, const string&, bool> {
-  bool operator()(const string& a, const string& b) const {
+  : public std::binary_function<const std::string&, const std::string&, bool> {
+  bool operator()(const std::string& a, const std::string& b) const {
     return StrictAutoDigitLessThan(b.data(), b.size(), a.data(), a.size());
   }
 };
@@ -371,26 +365,26 @@ struct strict_autodigit_greater
 //
 //    Return value: string
 // ----------------------------------------------------------------------
-inline string SimpleItoa(int32 i) {
+inline std::string SimpleItoa(int32 i) {
   char buf[16];  // Longest is -2147483648
-  return string(buf, FastInt32ToBufferLeft(i, buf));
+  return std::string(buf, FastInt32ToBufferLeft(i, buf));
 }
 
 // We need this overload because otherwise SimpleItoa(5U) wouldn't compile.
-inline string SimpleItoa(uint32 i) {
+inline std::string SimpleItoa(uint32 i) {
   char buf[16];  // Longest is 4294967295
-  return string(buf, FastUInt32ToBufferLeft(i, buf));
+  return std::string(buf, FastUInt32ToBufferLeft(i, buf));
 }
 
-inline string SimpleItoa(int64 i) {
+inline std::string SimpleItoa(int64 i) {
   char buf[32];  // Longest is -9223372036854775808
-  return string(buf, FastInt64ToBufferLeft(i, buf));
+  return std::string(buf, FastInt64ToBufferLeft(i, buf));
 }
 
 // We need this overload because otherwise SimpleItoa(5ULL) wouldn't compile.
-inline string SimpleItoa(uint64 i) {
+inline std::string SimpleItoa(uint64 i) {
   char buf[32];  // Longest is 18446744073709551615
-  return string(buf, FastUInt64ToBufferLeft(i, buf));
+  return std::string(buf, FastUInt64ToBufferLeft(i, buf));
 }
 
 // SimpleAtoi converts a string to an integer.
@@ -421,7 +415,7 @@ bool MUST_USE_RESULT SimpleAtoi(const char* s, int_type* out) {
 }
 
 template <typename int_type>
-bool MUST_USE_RESULT SimpleAtoi(const string& s, int_type* out) {
+bool MUST_USE_RESULT SimpleAtoi(const std::string& s, int_type* out) {
   return SimpleAtoi(s.c_str(), out);
 }
 
@@ -444,8 +438,8 @@ bool MUST_USE_RESULT SimpleAtoi(const string& s, int_type* out) {
 //
 //    Return value: string
 // ----------------------------------------------------------------------
-string SimpleDtoa(double value);
-string SimpleFtoa(float value);
+std::string SimpleDtoa(double value);
+std::string SimpleFtoa(float value);
 
 char* DoubleToBuffer(double i, char* buffer);
 char* FloatToBuffer(float i, char* buffer);
@@ -464,10 +458,10 @@ static const int kFloatToBufferSize = 24;
 //
 //    Return value: string
 // ----------------------------------------------------------------------
-string SimpleItoaWithCommas(int32 i);
-string SimpleItoaWithCommas(uint32 i);
-string SimpleItoaWithCommas(int64 i);
-string SimpleItoaWithCommas(uint64 i);
+std::string SimpleItoaWithCommas(int32 i);
+std::string SimpleItoaWithCommas(uint32 i);
+std::string SimpleItoaWithCommas(int64 i);
+std::string SimpleItoaWithCommas(uint64 i);
 
 // ----------------------------------------------------------------------
 // ItoaKMGT()
@@ -478,7 +472,7 @@ string SimpleItoaWithCommas(uint64 i);
 //
 //    Return value: string
 // ----------------------------------------------------------------------
-string ItoaKMGT(int64 i);
+std::string ItoaKMGT(int64 i);
 
 // ----------------------------------------------------------------------
 // ParseDoubleRange()
@@ -541,34 +535,34 @@ bool ParseDoubleRange(const char* text, int len, const char** end,
 // Do not use in new code.
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf or SimpleFtoa.
-string FloatToString(float f, const char* format);
+std::string FloatToString(float f, const char* format);
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf or SimpleItoa.
-string IntToString(int i, const char* format);
+std::string IntToString(int i, const char* format);
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf or SimpleItoa.
-string Int64ToString(int64 i64, const char* format);
+std::string Int64ToString(int64 i64, const char* format);
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf or SimpleItoa.
-string UInt64ToString(uint64 ui64, const char* format);
+std::string UInt64ToString(uint64 ui64, const char* format);
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf.
-inline string FloatToString(float f) {
+inline std::string FloatToString(float f) {
   return StringPrintf("%7f", f);
 }
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf.
-inline string IntToString(int i) {
+inline std::string IntToString(int i) {
   return StringPrintf("%7d", i);
 }
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf.
-inline string Int64ToString(int64 i64) {
+inline std::string Int64ToString(int64 i64) {
   return StringPrintf("%7" PRId64, i64);
 }
 
 // DEPRECATED(wadetregaskis).  Just call StringPrintf.
-inline string UInt64ToString(uint64 ui64) {
+inline std::string UInt64ToString(uint64 ui64) {
   return StringPrintf("%7" PRIu64, ui64);
 }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/serialize.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/serialize.h b/src/kudu/gutil/strings/serialize.h
index 7966cd2..d8c5d0b 100644
--- a/src/kudu/gutil/strings/serialize.h
+++ b/src/kudu/gutil/strings/serialize.h
@@ -12,12 +12,8 @@
 using __gnu_cxx::hash;
 using __gnu_cxx::hash_map;
 #include <string>
-using std::string;
 #include <utility>
-using std::make_pair;
-using std::pair;
 #include <vector>
-using std::vector;
 
 #include <glog/logging.h>
 
@@ -32,20 +28,20 @@ using std::vector;
 // Converts a 4-byte uint32 to a string such that the string keys sort in
 // the same order as the original uint32 value.
 // TODO(user): Rework all reinterpret_casts<> in this file.
-inline void KeyFromUint32(uint32 u32, string* key) {
+inline void KeyFromUint32(uint32 u32, std::string* key) {
   uint32 norder = ghtonl(u32);
   key->assign(reinterpret_cast<const char*>(&norder), sizeof(norder));
 }
 
 // Converts "fp" to an 8-byte string key
-inline void KeyFromUint64(uint64 fp, string* key) {
+inline void KeyFromUint64(uint64 fp, std::string* key) {
   uint64 norder = htonll(fp);
   key->assign(reinterpret_cast<const char*>(&norder), sizeof(norder));
 }
 
 // Converts a 16-byte uint128 to a string such that the string keys sort in
 // the same order as the original uint128 value.
-inline void KeyFromUint128(uint128 fp, string* key) {
+inline void KeyFromUint128(uint128 fp, std::string* key) {
   uint64 norder[] = { htonll(Uint128High64(fp)),
                       htonll(Uint128Low64(fp))
   };
@@ -53,13 +49,13 @@ inline void KeyFromUint128(uint128 fp, string* key) {
 }
 
 // This version of KeyFromUint32 is less efficient but very convenient
-string Uint32ToKey(uint32 u32);
+std::string Uint32ToKey(uint32 u32);
 
 // This version of KeyFromUint64 is less efficient but very convenient
-string Uint64ToKey(uint64 fp);
+std::string Uint64ToKey(uint64 fp);
 
 // This version of KeyFromUint128 is less efficient but very convenient
-string Uint128ToKey(uint128 u128);
+std::string Uint128ToKey(uint128 u128);
 
 // Converts a 4-byte string key (typically generated by KeyFromUint32 or
 // Uint32ToKey) into a uint32 value.
@@ -98,11 +94,11 @@ inline uint128 KeyToUint128(const StringPiece& key) {
 // inputs. To obtain keys such that lexicographic ordering corresponds
 // to the natural total order on the integers, use OrderedStringFromInt32()
 // or ReverseOrderedStringFromInt32() instead.
-void KeyFromInt32(int32 i32, string* key);
+void KeyFromInt32(int32 i32, std::string* key);
 
 // Convenient form of KeyFromInt32.
-inline string Int32ToKey(int32 i32) {
-  string s;
+inline std::string Int32ToKey(int32 i32) {
+  std::string s;
   KeyFromInt32(i32, &s);
   return s;
 }
@@ -113,21 +109,21 @@ int32 KeyToInt32(const StringPiece& key);
 
 // Converts a double value to an 8-byte string key, so that
 // the string keys sort in the same order as the original double values.
-void KeyFromDouble(double x, string* key);
+void KeyFromDouble(double x, std::string* key);
 
 // Converts key generated by KeyFromDouble() back to double.
 double KeyToDouble(const StringPiece& key);
 
 // This version of KeyFromDouble is less efficient but very convenient
-string DoubleToKey(double x);
+std::string DoubleToKey(double x);
 
 // Converts int32 to a 4-byte string key such that lexicographic
 // ordering of strings is equivalent to sorting in increasing order by
 // integer values. This can be useful when constructing secondary
-void OrderedStringFromInt32(int32 i32, string* key);
+void OrderedStringFromInt32(int32 i32, std::string* key);
 
 // This version of OrderedStringFromInt32 is less efficient but very convenient
-string Int32ToOrderedString(int32 i32);
+std::string Int32ToOrderedString(int32 i32);
 
 // The inverse of the above function.
 int32 OrderedStringToInt32(const StringPiece& key);
@@ -135,10 +131,10 @@ int32 OrderedStringToInt32(const StringPiece& key);
 // Converts int64 to an 8-byte string key such that lexicographic
 // ordering of strings is equivalent to sorting in increasing order by
 // integer values.
-void OrderedStringFromInt64(int64 i64, string* key);
+void OrderedStringFromInt64(int64 i64, std::string* key);
 
 // This version of OrderedStringFromInt64 is less efficient but very convenient
-string Int64ToOrderedString(int64 i64);
+std::string Int64ToOrderedString(int64 i64);
 
 // The inverse of the above function.
 int64 OrderedStringToInt64(const StringPiece& key);
@@ -146,10 +142,10 @@ int64 OrderedStringToInt64(const StringPiece& key);
 // Converts int32 to a 4-byte string key such that lexicographic
 // ordering of strings is equivalent to sorting in decreasing order
 // by integer values. This can be useful when constructing secondary
-void ReverseOrderedStringFromInt32(int32 i32, string* key);
+void ReverseOrderedStringFromInt32(int32 i32, std::string* key);
 
 // This version of ReverseOrderedStringFromInt32 is less efficient but very
-string Int32ToReverseOrderedString(int32 i32);
+std::string Int32ToReverseOrderedString(int32 i32);
 
 // The inverse of the above function.
 int32 ReverseOrderedStringToInt32(const StringPiece& key);
@@ -157,10 +153,10 @@ int32 ReverseOrderedStringToInt32(const StringPiece& key);
 // Converts int64 to an 8-byte string key such that lexicographic
 // ordering of strings is equivalent to sorting in decreasing order
 // by integer values. This can be useful when constructing secondary
-void ReverseOrderedStringFromInt64(int64 i64, string* key);
+void ReverseOrderedStringFromInt64(int64 i64, std::string* key);
 
 // This version of ReverseOrderedStringFromInt64 is less efficient but very
-string Int64ToReverseOrderedString(int64 i64);
+std::string Int64ToReverseOrderedString(int64 i64);
 
 // The inverse of the above function.
 int64 ReverseOrderedStringToInt64(const StringPiece& key);
@@ -176,9 +172,9 @@ int64 ReverseOrderedStringToInt64(const StringPiece& key);
 //   string s = EncodePOD(i);
 // in place of:
 //   string s = EncodeUint32(static_cast<uint32>(i));
-template <typename T> inline string EncodePOD(const T& value) {
+template <typename T> inline std::string EncodePOD(const T& value) {
   ENFORCE_POD(T);
-  string s;
+  std::string s;
   STLStringResizeUninitialized(&s, sizeof(T));
   memcpy(string_as_array(&s), &value, sizeof(T));
   return s;
@@ -214,11 +210,11 @@ template <typename T> inline bool DecodePOD(const StringPiece& str, T* result) {
 // Stores the value bytes of a vector of plain old data type in a C++ string.
 // Verifies the given data type is a POD and copies the bytes of each value
 // in the vector into a newly created string.
-template <typename T> inline string EncodeVectorPOD(const vector<T>& vec) {
+template <typename T> inline std::string EncodeVectorPOD(const std::vector<T>& vec) {
   ENFORCE_POD(T);
-  string s;
+  std::string s;
   STLStringResizeUninitialized(&s, vec.size() * sizeof(T));
-  typename vector<T>::const_iterator iter;
+  typename std::vector<T>::const_iterator iter;
   char* ptr;
   for (iter = vec.begin(), ptr = string_as_array(&s);
        iter != vec.end();
@@ -234,8 +230,8 @@ template <typename T> inline string EncodeVectorPOD(const vector<T>& vec) {
 // Returns true if the operation succeeded.
 // Note that other than the data length, no check is (or can be)
 // done on the type of data stored in the string.
-template <typename T> inline bool DecodeVectorPOD(const string& str,
-                                                  vector<T>* result) {
+template <typename T> inline bool DecodeVectorPOD(const std::string& str,
+                                                  std::vector<T>* result) {
   ENFORCE_POD(T);
   CHECK(result != NULL);
   if (str.size() % sizeof(T) != 0)
@@ -270,19 +266,19 @@ template <typename T> inline bool DecodeVectorPOD(const string& str,
 //    they make the payload type explicit.
 //    Note that these encodings are NOT endian-neutral.
 // ----------------------------------------------------------------------
-inline string EncodeDouble(double d) {
+inline std::string EncodeDouble(double d) {
   return EncodePOD(d);
 }
 
-inline string EncodeFloat(float f) {
+inline std::string EncodeFloat(float f) {
   return EncodePOD(f);
 }
 
-inline string EncodeUint32(uint32 i) {
+inline std::string EncodeUint32(uint32 i) {
   return EncodePOD(i);
 }
 
-inline string EncodeUint64(uint64 i) {
+inline std::string EncodeUint64(uint64 i) {
   return EncodePOD(i);
 }
 
@@ -311,8 +307,8 @@ inline bool DecodeUint64(const StringPiece& s, uint64* i) {
 //   <key, value> pairs. Returns true if there if no error in parsing, false
 //    otherwise.
 // -------------------------------------------------------------------------
-bool DictionaryParse(const string& encoded_str,
-                      vector<pair<string, string> >* items);
+bool DictionaryParse(const std::string& encoded_str,
+                      std::vector<std::pair<std::string, std::string> >* items);
 
 // --------------------------------------------------------------------------
 // DictionaryInt32Encode
@@ -328,16 +324,16 @@ bool DictionaryParse(const string& encoded_str,
 //   Note: these routines are not meant for use with very large dictionaries.
 //   They are written for convenience and not efficiency.
 // --------------------------------------------------------------------------
-string DictionaryInt32Encode(const hash_map<string, int32>* dictionary);
-string DictionaryInt64Encode(const hash_map<string, int64>* dictionary);
-string DictionaryDoubleEncode(const hash_map<string, double>* dictionary);
-
-bool DictionaryInt32Decode(hash_map<string, int32>* dictionary,
-                           const string& encoded_str);
-bool DictionaryInt64Decode(hash_map<string, int64>* dictionary,
-                           const string& encoded_str);
-bool DictionaryDoubleDecode(hash_map<string, double>* dictionary,
-                            const string& encoded_str);
+std::string DictionaryInt32Encode(const hash_map<std::string, int32>* dictionary);
+std::string DictionaryInt64Encode(const hash_map<std::string, int64>* dictionary);
+std::string DictionaryDoubleEncode(const hash_map<std::string, double>* dictionary);
+
+bool DictionaryInt32Decode(hash_map<std::string, int32>* dictionary,
+                           const std::string& encoded_str);
+bool DictionaryInt64Decode(hash_map<std::string, int64>* dictionary,
+                           const std::string& encoded_str);
+bool DictionaryDoubleDecode(hash_map<std::string, double>* dictionary,
+                            const std::string& encoded_str);
 
 
 #endif  // STRINGS_SERIALIZE_H_

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/split.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.cc b/src/kudu/gutil/strings/split.cc
index a42faa7..f8de413 100644
--- a/src/kudu/gutil/strings/split.cc
+++ b/src/kudu/gutil/strings/split.cc
@@ -8,10 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <iterator>
-using std::back_insert_iterator;
-using std::iterator_traits;
 #include <limits>
-using std::numeric_limits;
 
 #include "kudu/gutil/integral_types.h"
 #include <glog/logging.h>
@@ -22,6 +19,15 @@ using std::numeric_limits;
 #include "kudu/gutil/strings/util.h"
 #include "kudu/gutil/hash/hash.h"
 
+using std::back_insert_iterator;
+using std::iterator_traits;
+using std::map;
+using std::numeric_limits;
+using std::pair;
+using std::set;
+using std::string;
+using std::vector;
+
 // Implementations for some of the Split2 API. Much of the Split2 API is
 // templated so it exists in header files, either strings/split.h or
 // strings/split_iternal.h.

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/split.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.h b/src/kudu/gutil/strings/split.h
index c487689..cdf59aa 100644
--- a/src/kudu/gutil/strings/split.h
+++ b/src/kudu/gutil/strings/split.h
@@ -22,12 +22,6 @@
 
 #include <stddef.h>
 #include <algorithm>
-using std::copy;
-using std::max;
-using std::min;
-using std::reverse;
-using std::sort;
-using std::swap;
 #include <ext/hash_map>
 using __gnu_cxx::hash;
 using __gnu_cxx::hash_map;
@@ -35,21 +29,11 @@ using __gnu_cxx::hash_map;
 using __gnu_cxx::hash;
 using __gnu_cxx::hash_set;
 #include <iterator>
-using std::back_insert_iterator;
-using std::iterator_traits;
 #include <map>
-using std::map;
-using std::multimap;
 #include <set>
-using std::multiset;
-using std::set;
 #include <string>
-using std::string;
 #include <utility>
-using std::make_pair;
-using std::pair;
 #include <vector>
-using std::vector;
 
 #include <glog/logging.h>
 
@@ -356,7 +340,7 @@ class Literal {
   StringPiece Find(StringPiece text) const;
 
  private:
-  const string delimiter_;
+  const std::string delimiter_;
 };
 
 // Represents a delimiter that will match any of the given byte-sized
@@ -383,7 +367,7 @@ class AnyOf {
   StringPiece Find(StringPiece text) const;
 
  private:
-  const string delimiters_;
+  const std::string delimiters_;
 };
 
 // Wraps another delimiter and sets a max number of matches for that delimiter.
@@ -427,7 +411,7 @@ inline LimitImpl<Literal> Limit(const char* s, int limit) {
   return LimitImpl<Literal>(Literal(s), limit);
 }
 
-inline LimitImpl<Literal> Limit(const string& s, int limit) {
+inline LimitImpl<Literal> Limit(const std::string& s, int limit) {
   return LimitImpl<Literal>(Literal(s), limit);
 }
 
@@ -500,7 +484,7 @@ inline internal::Splitter<delimiter::Literal> Split(
 }
 
 inline internal::Splitter<delimiter::Literal> Split(
-    StringPiece text, const string& delimiter) {
+    StringPiece text, const std::string& delimiter) {
   return internal::Splitter<delimiter::Literal>(
       text, delimiter::Literal(delimiter));
 }
@@ -521,7 +505,7 @@ inline internal::Splitter<delimiter::Literal, Predicate> Split(
 
 template <typename Predicate>
 inline internal::Splitter<delimiter::Literal, Predicate> Split(
-    StringPiece text, const string& delimiter, Predicate p) {
+    StringPiece text, const std::string& delimiter, Predicate p) {
   return internal::Splitter<delimiter::Literal, Predicate>(
       text, delimiter::Literal(delimiter), p);
 }
@@ -573,7 +557,7 @@ void ClipString(char* str, int max_len);
 //    Version of ClipString() that uses string instead of char*.
 //    NOTE: See comment above.
 // ----------------------------------------------------------------------
-void ClipString(string* full_str, int max_len);
+void ClipString(std::string* full_str, int max_len);
 
 // ----------------------------------------------------------------------
 // SplitStringToLines() Split a string into lines of maximum length
@@ -587,7 +571,7 @@ void ClipString(string* full_str, int max_len);
 void SplitStringToLines(const char* full,
                         int max_len,
                         int num_lines,
-                        vector<string>* result);
+                        std::vector<std::string>* result);
 
 // ----------------------------------------------------------------------
 // SplitOneStringToken()
@@ -607,7 +591,7 @@ void SplitStringToLines(const char* full,
 //     // r = "abc"
 //     // s points to ";de"
 // ----------------------------------------------------------------------
-string SplitOneStringToken(const char** source, const char* delim);
+std::string SplitOneStringToken(const char** source, const char* delim);
 
 // ----------------------------------------------------------------------
 // SplitUsing()
@@ -618,7 +602,7 @@ string SplitOneStringToken(const char** source, const char* delim);
 //    Use SplitToVector with last argument 'false' if you want the
 //    empty fields.
 //    ----------------------------------------------------------------------
-vector<char*>* SplitUsing(char* full, const char* delimiters);
+std::vector<char*>* SplitUsing(char* full, const char* delimiters);
 
 // ----------------------------------------------------------------------
 // SplitToVector()
@@ -628,10 +612,10 @@ vector<char*>* SplitUsing(char* full, const char* delimiters);
 //    true, empty strings are omitted from the resulting vector.
 // ----------------------------------------------------------------------
 void SplitToVector(char* full, const char* delimiters,
-                   vector<char*>* vec,
+                   std::vector<char*>* vec,
                    bool omit_empty_strings);
 void SplitToVector(char* full, const char* delimiters,
-                   vector<const char*>* vec,
+                   std::vector<const char*>* vec,
                    bool omit_empty_strings);
 
 // ----------------------------------------------------------------------
@@ -645,7 +629,7 @@ void SplitToVector(char* full, const char* delimiters,
 // ----------------------------------------------------------------------
 void SplitStringPieceToVector(const StringPiece& full,
                               const char* delim,
-                              vector<StringPiece>* vec,
+                              std::vector<StringPiece>* vec,
                               bool omit_empty_strings);
 
 // ----------------------------------------------------------------------
@@ -676,21 +660,21 @@ void SplitStringPieceToVector(const StringPiece& full,
 // For even better performance, store the result in a vector<StringPiece>
 // to avoid string copies.
 // ----------------------------------------------------------------------
-void SplitStringUsing(const string& full, const char* delimiters,
-                      vector<string>* result);
-void SplitStringToHashsetUsing(const string& full, const char* delimiters,
-                               hash_set<string>* result);
-void SplitStringToSetUsing(const string& full, const char* delimiters,
-                           set<string>* result);
+void SplitStringUsing(const std::string& full, const char* delimiters,
+                      std::vector<std::string>* result);
+void SplitStringToHashsetUsing(const std::string& full, const char* delimiters,
+                               hash_set<std::string>* result);
+void SplitStringToSetUsing(const std::string& full, const char* delimiters,
+                           std::set<std::string>* result);
 // The even-positioned (0-based) components become the keys for the
 // odd-positioned components that follow them. When there is an odd
 // number of components, the value for the last key will be unchanged
 // if the key was already present in the hash table, or will be the
 // empty string if the key is a newly inserted key.
-void SplitStringToMapUsing(const string& full, const char* delim,
-                           map<string, string>* result);
-void SplitStringToHashmapUsing(const string& full, const char* delim,
-                               hash_map<string, string>* result);
+void SplitStringToMapUsing(const std::string& full, const char* delim,
+                           std::map<std::string, std::string>* result);
+void SplitStringToHashmapUsing(const std::string& full, const char* delim,
+                               hash_map<std::string, std::string>* result);
 
 // ----------------------------------------------------------------------
 // SplitStringAllowEmpty()
@@ -712,8 +696,8 @@ void SplitStringToHashmapUsing(const string& full, const char* delim,
 // For even better performance, store the result in a vector<StringPiece> to
 // avoid string copies.
 // ----------------------------------------------------------------------
-void SplitStringAllowEmpty(const string& full, const char* delim,
-                           vector<string>* result);
+void SplitStringAllowEmpty(const std::string& full, const char* delim,
+                           std::vector<std::string>* result);
 
 // ----------------------------------------------------------------------
 // SplitStringWithEscaping()
@@ -733,18 +717,18 @@ void SplitStringAllowEmpty(const string& full, const char* delim,
 //
 //   All versions other than "AllowEmpty" discard any empty substrings.
 // ----------------------------------------------------------------------
-void SplitStringWithEscaping(const string& full,
+void SplitStringWithEscaping(const std::string& full,
                              const strings::CharSet& delimiters,
-                             vector<string>* result);
-void SplitStringWithEscapingAllowEmpty(const string& full,
+                             std::vector<std::string>* result);
+void SplitStringWithEscapingAllowEmpty(const std::string& full,
                                        const strings::CharSet& delimiters,
-                                       vector<string>* result);
-void SplitStringWithEscapingToSet(const string& full,
+                                       std::vector<std::string>* result);
+void SplitStringWithEscapingToSet(const std::string& full,
                                   const strings::CharSet& delimiters,
-                                  set<string>* result);
-void SplitStringWithEscapingToHashset(const string& full,
+                                  std::set<std::string>* result);
+void SplitStringWithEscapingToHashset(const std::string& full,
                                       const strings::CharSet& delimiters,
-                                      hash_set<string>* result);
+                                      hash_set<std::string>* result);
 
 // ----------------------------------------------------------------------
 // SplitStringIntoNPiecesAllowEmpty()
@@ -759,10 +743,10 @@ void SplitStringWithEscapingToHashset(const string& full,
 //
 //    If "full" is the empty string, yields an empty string as the only value.
 // ----------------------------------------------------------------------
-void SplitStringIntoNPiecesAllowEmpty(const string& full,
+void SplitStringIntoNPiecesAllowEmpty(const std::string& full,
                                       const char* delimiters,
                                       int pieces,
-                                      vector<string>* result);
+                                      std::vector<std::string>* result);
 
 // ----------------------------------------------------------------------
 // SplitStringAndParse()
@@ -806,18 +790,18 @@ void SplitStringIntoNPiecesAllowEmpty(const string& full,
 // ----------------------------------------------------------------------
 template <class T>
 bool SplitStringAndParse(StringPiece source, StringPiece delim,
-                         bool (*parse)(const string& str, T* value),
-                         vector<T>* result);
+                         bool (*parse)(const std::string& str, T* value),
+                         std::vector<T>* result);
 template <class Container>
 bool SplitStringAndParseToContainer(
     StringPiece source, StringPiece delim,
-    bool (*parse)(const string& str, typename Container::value_type* value),
+    bool (*parse)(const std::string& str, typename Container::value_type* value),
     Container* result);
 
 template <class List>
 bool SplitStringAndParseToList(
     StringPiece source, StringPiece delim,
-    bool (*parse)(const string& str, typename List::value_type* value),
+    bool (*parse)(const std::string& str, typename List::value_type* value),
     List* result);
 // ----------------------------------------------------------------------
 // SplitRange()
@@ -866,12 +850,12 @@ bool SplitRange(const char* rangestr, int* from, int* to);
 // See //util/csv/parser.h for more complete documentation.
 //
 // ----------------------------------------------------------------------
-void SplitCSVLine(char* line, vector<char*>* cols);
+void SplitCSVLine(char* line, std::vector<char*>* cols);
 void SplitCSVLineWithDelimiter(char* line, char delimiter,
-                               vector<char*>* cols);
+                               std::vector<char*>* cols);
 // SplitCSVLine string wrapper that internally makes a copy of string line.
-void SplitCSVLineWithDelimiterForStrings(const string& line, char delimiter,
-                                         vector<string>* cols);
+void SplitCSVLineWithDelimiterForStrings(const std::string& line, char delimiter,
+                                         std::vector<std::string>* cols);
 
 // ----------------------------------------------------------------------
 // SplitStructuredLine()
@@ -898,14 +882,14 @@ void SplitCSVLineWithDelimiterForStrings(const string& line, char delimiter,
 char* SplitStructuredLine(char* line,
                           char delimiter,
                           const char* symbol_pairs,
-                          vector<char*>* cols);
+                          std::vector<char*>* cols);
 
 // Similar to the function with the same name above, but splits a StringPiece
 // into StringPiece parts. Returns true if successful.
 bool SplitStructuredLine(StringPiece line,
                          char delimiter,
                          const char* symbol_pairs,
-                         vector<StringPiece>* cols);
+                         std::vector<StringPiece>* cols);
 
 // ----------------------------------------------------------------------
 // SplitStructuredLineWithEscapes()
@@ -929,14 +913,14 @@ bool SplitStructuredLine(StringPiece line,
 char* SplitStructuredLineWithEscapes(char* line,
                                      char delimiter,
                                      const char* symbol_pairs,
-                                     vector<char*>* cols);
+                                     std::vector<char*>* cols);
 
 // Similar to the function with the same name above, but splits a StringPiece
 // into StringPiece parts. Returns true if successful.
 bool SplitStructuredLineWithEscapes(StringPiece line,
                                     char delimiter,
                                     const char* symbol_pairs,
-                                    vector<StringPiece>* cols);
+                                    std::vector<StringPiece>* cols);
 
 // ----------------------------------------------------------------------
 // DEPRECATED(jgm): See the "NEW API" comment about this function below for
@@ -987,10 +971,10 @@ bool SplitStructuredLineWithEscapes(StringPiece line,
 //   vector<string> values = Split(key_values.second, AnyOf(vv_delim));
 //
 // ----------------------------------------------------------------------
-bool SplitStringIntoKeyValues(const string& line,
-                              const string& key_value_delimiters,
-                              const string& value_value_delimiters,
-                              string* key, vector<string>* values);
+bool SplitStringIntoKeyValues(const std::string& line,
+                              const std::string& key_value_delimiters,
+                              const std::string& value_value_delimiters,
+                              std::string* key, std::vector<std::string>* values);
 
 // ----------------------------------------------------------------------
 // SplitStringIntoKeyValuePairs()
@@ -1033,10 +1017,11 @@ bool SplitStringIntoKeyValues(const string& line,
 //   }
 //
 // ----------------------------------------------------------------------
-bool SplitStringIntoKeyValuePairs(const string& line,
-                                  const string& key_value_delimiters,
-                                  const string& key_value_pair_delimiters,
-                                  vector<pair<string, string> >* kv_pairs);
+bool SplitStringIntoKeyValuePairs(
+    const std::string& line,
+    const std::string& key_value_delimiters,
+    const std::string& key_value_pair_delimiters,
+    std::vector<std::pair<std::string, std::string> >* kv_pairs);
 
 
 // ----------------------------------------------------------------------
@@ -1048,8 +1033,8 @@ bool SplitStringIntoKeyValuePairs(const string& line,
 //    whitespace (does not consume trailing whitespace), and returns
 //    a pointer beyond the last character parsed.
 // --------------------------------------------------------------------
-const char* SplitLeadingDec32Values(const char* next, vector<int32>* result);
-const char* SplitLeadingDec64Values(const char* next, vector<int64>* result);
+const char* SplitLeadingDec32Values(const char* next, std::vector<int32>* result);
+const char* SplitLeadingDec64Values(const char* next, std::vector<int64>* result);
 
 // ----------------------------------------------------------------------
 // SplitOneIntToken()
@@ -1135,8 +1120,8 @@ bool SplitOneHexUint64Token(const char** source, const char* delim,
 // SplitStringAndParse() -- see description above
 template <class T>
 bool SplitStringAndParse(StringPiece source, StringPiece delim,
-                         bool (*parse)(const string& str, T* value),
-                         vector<T>* result) {
+                         bool (*parse)(const std::string& str, T* value),
+                         std::vector<T>* result) {
   return SplitStringAndParseToList(source, delim, parse, result);
 }
 
@@ -1146,16 +1131,15 @@ namespace internal {
 template <class Container, class InsertPolicy>
 bool SplitStringAndParseToInserter(
     StringPiece source, StringPiece delim,
-    bool (*parse)(const string& str, typename Container::value_type* value),
+    bool (*parse)(const std::string& str, typename Container::value_type* value),
     Container* result, InsertPolicy insert_policy) {
   CHECK(NULL != parse);
   CHECK(NULL != result);
   CHECK(NULL != delim.data());
   CHECK_GT(delim.size(), 0);
   bool retval = true;
-  vector<StringPiece> pieces = strings::Split(source,
-                                              strings::delimiter::AnyOf(delim),
-                                              strings::SkipEmpty());
+  std::vector<StringPiece> pieces = strings::Split(
+      source, strings::delimiter::AnyOf(delim), strings::SkipEmpty());
   for (const auto& piece : pieces) {
     typename Container::value_type t;
     if (parse(piece.as_string(), &t)) {
@@ -1187,7 +1171,7 @@ struct BackInsertPolicy {
 template <class Container>
 bool SplitStringAndParseToContainer(
     StringPiece source, StringPiece delim,
-    bool (*parse)(const string& str, typename Container::value_type* value),
+    bool (*parse)(const std::string& str, typename Container::value_type* value),
     Container* result) {
   return strings::internal::SplitStringAndParseToInserter(
       source, delim, parse, result, strings::internal::BasicInsertPolicy());
@@ -1197,7 +1181,7 @@ bool SplitStringAndParseToContainer(
 template <class List>
 bool SplitStringAndParseToList(
     StringPiece source, StringPiece delim,
-    bool (*parse)(const string& str, typename List::value_type* value),
+    bool (*parse)(const std::string& str, typename List::value_type* value),
     List* result) {
   return strings::internal::SplitStringAndParseToInserter(
       source, delim, parse, result, strings::internal::BackInsertPolicy());

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/split_internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split_internal.h b/src/kudu/gutil/strings/split_internal.h
index 01b3fac..eef72df 100644
--- a/src/kudu/gutil/strings/split_internal.h
+++ b/src/kudu/gutil/strings/split_internal.h
@@ -18,13 +18,8 @@
 #define STRINGS_SPLIT_INTERNAL_H_
 
 #include <iterator>
-using std::back_insert_iterator;
-using std::iterator_traits;
 #include <map>
-using std::map;
-using std::multimap;
 #include <vector>
-using std::vector;
 
 #include "kudu/gutil/port.h"  // for LANG_CXX11
 #include "kudu/gutil/strings/stringpiece.h"
@@ -165,16 +160,16 @@ struct StringPieceTo {
 
 // Specialization for converting to string.
 template <>
-struct StringPieceTo<string> {
-  string operator()(StringPiece from) const {
+struct StringPieceTo<std::string> {
+  std::string operator()(StringPiece from) const {
     return from.ToString();
   }
 };
 
 // Specialization for converting to *const* string.
 template <>
-struct StringPieceTo<const string> {
-  string operator()(StringPiece from) const {
+struct StringPieceTo<const std::string> {
+  std::string operator()(StringPiece from) const {
     return from.ToString();
   }
 };
@@ -320,7 +315,7 @@ class Splitter {
   // use of this intermediate vector "v" can be removed.
   template <typename Container>
   Container ToContainer() {
-    vector<StringPiece> v;
+    std::vector<StringPiece> v;
     for (Iterator it = begin(); it != end_; ++it) {
       v.push_back(*it);
     }
@@ -397,7 +392,7 @@ class Splitter {
 
   // Reserves the given amount of capacity in a vector<string>
   template <typename A>
-  void ReserveCapacity(vector<string, A>* v, size_t size) {
+  void ReserveCapacity(std::vector<std::string, A>* v, size_t size) {
     v->reserve(size);
   }
   void ReserveCapacity(...) {}

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/strcat.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strcat.cc b/src/kudu/gutil/strings/strcat.cc
index 93f8114..9abb662 100644
--- a/src/kudu/gutil/strings/strcat.cc
+++ b/src/kudu/gutil/strings/strcat.cc
@@ -14,6 +14,8 @@
 #include "kudu/gutil/strings/escaping.h"
 #include "kudu/gutil/stl_util.h"
 
+using std::string;
+
 AlphaNum gEmptyAlphaNum("");
 
 // ----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/strcat.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strcat.h b/src/kudu/gutil/strings/strcat.h
index 40b888b..7216c66 100644
--- a/src/kudu/gutil/strings/strcat.h
+++ b/src/kudu/gutil/strings/strcat.h
@@ -8,7 +8,6 @@
 #define STRINGS_STRCAT_H_
 
 #include <string>
-using std::string;
 
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/strings/numbers.h"
@@ -64,7 +63,7 @@ struct AlphaNum {
   AlphaNum(const char *c_str) : piece(c_str) {}  // NOLINT(runtime/explicit)
   AlphaNum(StringPiece pc)
       : piece(std::move(pc)) {}            // NOLINT(runtime/explicit)
-  AlphaNum(const string &s) : piece(s) {}  // NOLINT(runtime/explicit)
+  AlphaNum(const std::string &s) : piece(s) {}  // NOLINT(runtime/explicit)
 
   StringPiece::size_type size() const { return piece.size(); }
   const char *data() const { return piece.data(); }
@@ -99,19 +98,19 @@ extern AlphaNum gEmptyAlphaNum;
 //    be a reference into str.
 // ----------------------------------------------------------------------
 
-string StrCat(const AlphaNum &a);
-string StrCat(const AlphaNum &a, const AlphaNum &b);
-string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c);
-string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+std::string StrCat(const AlphaNum &a);
+std::string StrCat(const AlphaNum &a, const AlphaNum &b);
+std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c);
+std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
               const AlphaNum &d);
-string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
               const AlphaNum &d, const AlphaNum &e);
-string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
               const AlphaNum &d, const AlphaNum &e, const AlphaNum &f);
-string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
               const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
               const AlphaNum &g);
-string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
               const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
               const AlphaNum &g, const AlphaNum &h);
 
@@ -119,13 +118,13 @@ namespace strings {
 namespace internal {
 
 // Do not call directly - this is not part of the public API.
-string StrCatNineOrMore(const AlphaNum *a1, ...);
+  std::string StrCatNineOrMore(const AlphaNum *a1, ...);
 
 }  // namespace internal
 }  // namespace strings
 
 // Support 9 or more arguments
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i) {
   const AlphaNum* null_alphanum = NULL;
@@ -133,7 +132,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j) {
@@ -142,7 +141,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &j, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k) {
@@ -151,7 +150,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &j, &k, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l) {
@@ -160,7 +159,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &j, &k, &l, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -170,7 +169,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &j, &k, &l, &m, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -180,7 +179,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &j, &k, &l, &m, &n, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -191,7 +190,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -203,7 +202,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -215,7 +214,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -227,7 +226,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -240,7 +239,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &s, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -253,7 +252,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &s, &t, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -266,7 +265,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &s, &t, &u, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -280,7 +279,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &s, &t, &u, &v, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -294,7 +293,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              &s, &t, &u, &v, &w, null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -309,7 +308,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -325,7 +324,7 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                                              null_alphanum);
 }
 
-inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
+inline std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
                      const AlphaNum &d, const AlphaNum &e, const AlphaNum &f,
                      const AlphaNum &g, const AlphaNum &h, const AlphaNum &i,
                      const AlphaNum &j, const AlphaNum &k, const AlphaNum &l,
@@ -362,15 +361,15 @@ inline string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
 //    worked around as consecutive calls to StrAppend are quite efficient.
 // ----------------------------------------------------------------------
 
-void StrAppend(string *dest,      const AlphaNum &a);
-void StrAppend(string *dest,      const AlphaNum &a, const AlphaNum &b);
-void StrAppend(string *dest,      const AlphaNum &a, const AlphaNum &b,
+void StrAppend(std::string *dest,      const AlphaNum &a);
+void StrAppend(std::string *dest,      const AlphaNum &a, const AlphaNum &b);
+void StrAppend(std::string *dest,      const AlphaNum &a, const AlphaNum &b,
                const AlphaNum &c);
-void StrAppend(string *dest,      const AlphaNum &a, const AlphaNum &b,
+void StrAppend(std::string *dest,      const AlphaNum &a, const AlphaNum &b,
                const AlphaNum &c, const AlphaNum &d);
 
 // Support up to 9 params by using a default empty AlphaNum.
-void StrAppend(string *dest,      const AlphaNum &a, const AlphaNum &b,
+void StrAppend(std::string *dest,      const AlphaNum &a, const AlphaNum &b,
                const AlphaNum &c, const AlphaNum &d, const AlphaNum &e,
                const AlphaNum &f = gEmptyAlphaNum,
                const AlphaNum &g = gEmptyAlphaNum,

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/stringpiece.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/stringpiece.h b/src/kudu/gutil/strings/stringpiece.h
index 0f28f2b..5812dd6 100644
--- a/src/kudu/gutil/strings/stringpiece.h
+++ b/src/kudu/gutil/strings/stringpiece.h
@@ -371,7 +371,7 @@ template<> struct GoodFastHash<StringPiece> {
 #endif
 
 // allow StringPiece to be logged
-extern ostream& operator<<(ostream& o, StringPiece piece);
+extern std::ostream& operator<<(std::ostream& o, StringPiece piece);
 
 
 #endif  // STRINGS_STRINGPIECE_H__

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/strip.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strip.h b/src/kudu/gutil/strings/strip.h
index 8104b76..f834397 100644
--- a/src/kudu/gutil/strings/strip.h
+++ b/src/kudu/gutil/strings/strip.h
@@ -9,7 +9,6 @@
 
 #include <stddef.h>
 #include <string>
-using std::string;
 
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/stringpiece.h"
@@ -17,25 +16,25 @@ using std::string;
 // Given a string and a putative prefix, returns the string minus the
 // prefix string if the prefix matches, otherwise the original
 // string.
-string StripPrefixString(StringPiece str, const StringPiece& prefix);
+std::string StripPrefixString(StringPiece str, const StringPiece& prefix);
 
 // Like StripPrefixString, but return true if the prefix was
 // successfully matched.  Write the output to *result.
 // It is safe for result to point back to the input string.
 bool TryStripPrefixString(StringPiece str, const StringPiece& prefix,
-                          string* result);
+                          std::string* result);
 
 // Given a string and a putative suffix, returns the string minus the
 // suffix string if the suffix matches, otherwise the original
 // string.
-string StripSuffixString(StringPiece str, const StringPiece& suffix);
+std::string StripSuffixString(StringPiece str, const StringPiece& suffix);
 
 
 // Like StripSuffixString, but return true if the suffix was
 // successfully matched.  Write the output to *result.
 // It is safe for result to point back to the input string.
 bool TryStripSuffixString(StringPiece str, const StringPiece& suffix,
-                          string* result);
+                          std::string* result);
 
 // ----------------------------------------------------------------------
 // StripString
@@ -53,7 +52,7 @@ inline void StripString(char* str, char remove, char replacewith) {
 
 void StripString(char* str, StringPiece remove, char replacewith);
 void StripString(char* str, int len, StringPiece remove, char replacewith);
-void StripString(string* s, StringPiece remove, char replacewith);
+void StripString(std::string* s, StringPiece remove, char replacewith);
 
 // ----------------------------------------------------------------------
 // StripDupCharacters
@@ -62,7 +61,7 @@ void StripString(string* s, StringPiece remove, char replacewith);
 //       StripDupCharacters("a//b/c//d", '/', 0) => "a/b/c/d"
 //    Return the number of characters removed
 // ----------------------------------------------------------------------
-int StripDupCharacters(string* s, char dup_char, int start_pos);
+int StripDupCharacters(std::string* s, char dup_char, int start_pos);
 
 // ----------------------------------------------------------------------
 // StripWhiteSpace
@@ -88,7 +87,7 @@ void StripWhiteSpace(const char** str, int* len);
 // StripTrailingWhitespace()
 //   Removes whitespace at the end of the string *s.
 //------------------------------------------------------------------------
-void StripTrailingWhitespace(string* s);
+void StripTrailingWhitespace(std::string* s);
 
 //------------------------------------------------------------------------
 // StripTrailingNewline(string*)
@@ -97,7 +96,7 @@ void StripTrailingWhitespace(string* s);
 //   input mode, which appends '\n' to each map input.  Returns true
 //   if a newline was stripped.
 //------------------------------------------------------------------------
-bool StripTrailingNewline(string* s);
+bool StripTrailingNewline(std::string* s);
 
 inline void StripWhiteSpace(char** str, int* len) {
   // The "real" type for StripWhiteSpace is ForAll char types C, take
@@ -114,7 +113,7 @@ inline void StripWhiteSpace(StringPiece* str) {
   str->set(data, len);
 }
 
-void StripWhiteSpace(string* str);
+void StripWhiteSpace(std::string* str);
 
 namespace strings {
 
@@ -151,10 +150,10 @@ inline char* StripLeadingWhiteSpace(char* line) {
       StripLeadingWhiteSpace(const_cast<const char*>(line)));
 }
 
-void StripLeadingWhiteSpace(string* str);
+void StripLeadingWhiteSpace(std::string* str);
 
 // Remove leading, trailing, and duplicate internal whitespace.
-void RemoveExtraWhitespace(string* s);
+void RemoveExtraWhitespace(std::string* s);
 
 
 // ----------------------------------------------------------------------
@@ -184,8 +183,8 @@ inline char* SkipLeadingWhiteSpace(char* str) {
 //    left and right bracket characters, such as '(' and ')'.
 // ----------------------------------------------------------------------
 
-void StripCurlyBraces(string* s);
-void StripBrackets(char left, char right, string* s);
+void StripCurlyBraces(std::string* s);
+void StripBrackets(char left, char right, std::string* s);
 
 
 // ----------------------------------------------------------------------
@@ -205,29 +204,29 @@ void StripBrackets(char left, char right, string* s);
 //    See "perldoc -q html"
 // ----------------------------------------------------------------------
 
-void StripMarkupTags(string* s);
-string OutputWithMarkupTagsStripped(const string& s);
+void StripMarkupTags(std::string* s);
+std::string OutputWithMarkupTagsStripped(const std::string& s);
 
 // ----------------------------------------------------------------------
 // TrimStringLeft
 //    Removes any occurrences of the characters in 'remove' from the start
 //    of the string.  Returns the number of chars trimmed.
 // ----------------------------------------------------------------------
-int TrimStringLeft(string* s, const StringPiece& remove);
+int TrimStringLeft(std::string* s, const StringPiece& remove);
 
 // ----------------------------------------------------------------------
 // TrimStringRight
 //    Removes any occurrences of the characters in 'remove' from the end
 //    of the string.  Returns the number of chars trimmed.
 // ----------------------------------------------------------------------
-int TrimStringRight(string* s, const StringPiece& remove);
+int TrimStringRight(std::string* s, const StringPiece& remove);
 
 // ----------------------------------------------------------------------
 // TrimString
 //    Removes any occurrences of the characters in 'remove' from either
 //    end of the string.
 // ----------------------------------------------------------------------
-inline int TrimString(string* s, const StringPiece& remove) {
+inline int TrimString(std::string* s, const StringPiece& remove) {
   return TrimStringRight(s, remove) + TrimStringLeft(s, remove);
 }
 
@@ -243,13 +242,13 @@ inline int TrimString(string* s, const StringPiece& remove) {
 //    "  a:(b):c  " -> "a b c"
 //    "first,last::(area)phone, ::zip" -> "first last area phone zip"
 // ----------------------------------------------------------------------
-void TrimRunsInString(string* s, StringPiece remove);
+void TrimRunsInString(std::string* s, StringPiece remove);
 
 // ----------------------------------------------------------------------
 // RemoveNullsInString
 //    Removes any internal \0 characters from the string.
 // ----------------------------------------------------------------------
-void RemoveNullsInString(string* s);
+void RemoveNullsInString(std::string* s);
 
 // ----------------------------------------------------------------------
 // strrm()
@@ -267,6 +266,6 @@ int memrm(char* str, int strlen, char c);
 //    Returns the new length.
 // ----------------------------------------------------------------------
 int strrmm(char* str, const char* chars);
-int strrmm(string* str, const string& chars);
+int strrmm(std::string* str, const std::string& chars);
 
 #endif  // STRINGS_STRIP_H_

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/substitute.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/substitute.cc b/src/kudu/gutil/strings/substitute.cc
index 5e5c12a..c0d5e81 100644
--- a/src/kudu/gutil/strings/substitute.cc
+++ b/src/kudu/gutil/strings/substitute.cc
@@ -9,6 +9,8 @@
 #include "kudu/gutil/strings/escaping.h"
 #include "kudu/gutil/stl_util.h"
 
+using std::string;
+
 namespace strings {
 
 using internal::SubstituteArg;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/substitute.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/substitute.h b/src/kudu/gutil/strings/substitute.h
index 2de5960..3040156 100644
--- a/src/kudu/gutil/strings/substitute.h
+++ b/src/kudu/gutil/strings/substitute.h
@@ -2,7 +2,6 @@
 
 #include <string.h>
 #include <string>
-using std::string;
 
 #include "kudu/gutil/basictypes.h"
 #include "kudu/gutil/strings/numbers.h"
@@ -75,7 +74,7 @@ class SubstituteArg {
   // object.
   inline SubstituteArg(const char* value)  // NOLINT(runtime/explicit)
     : text_(value), size_(value == NULL ? 0 : strlen(text_)) {}
-  inline SubstituteArg(const string& value)  // NOLINT(runtime/explicit)
+  inline SubstituteArg(const std::string& value)  // NOLINT(runtime/explicit)
     : text_(value.data()), size_(value.size()) {}
   inline SubstituteArg(const StringPiece& value)  // NOLINT(runtime/explicit)
     : text_(value.data()), size_(value.size()) {}
@@ -157,7 +156,7 @@ char* SubstituteToBuffer(StringPiece format,
 }  // namespace internal
 
 void SubstituteAndAppend(
-  string* output, StringPiece format,
+  std::string* output, StringPiece format,
   const internal::SubstituteArg& arg0 = internal::SubstituteArg::kNoArg,
   const internal::SubstituteArg& arg1 = internal::SubstituteArg::kNoArg,
   const internal::SubstituteArg& arg2 = internal::SubstituteArg::kNoArg,
@@ -169,7 +168,7 @@ void SubstituteAndAppend(
   const internal::SubstituteArg& arg8 = internal::SubstituteArg::kNoArg,
   const internal::SubstituteArg& arg9 = internal::SubstituteArg::kNoArg);
 
-inline string Substitute(
+inline std::string Substitute(
   StringPiece format,
   const internal::SubstituteArg& arg0 = internal::SubstituteArg::kNoArg,
   const internal::SubstituteArg& arg1 = internal::SubstituteArg::kNoArg,
@@ -181,7 +180,7 @@ inline string Substitute(
   const internal::SubstituteArg& arg7 = internal::SubstituteArg::kNoArg,
   const internal::SubstituteArg& arg8 = internal::SubstituteArg::kNoArg,
   const internal::SubstituteArg& arg9 = internal::SubstituteArg::kNoArg) {
-  string result;
+  std::string result;
   SubstituteAndAppend(&result, format, arg0, arg1, arg2, arg3, arg4,
                                        arg5, arg6, arg7, arg8, arg9);
   return result;


Mime
View raw message