* C++, use cEscape instead. This function is for display purposes
* only.
*/
-template <class String1, class String2>
-void backslashify(const String1& input, String2& output, bool hex_style=false);
+template <class OutputString>
+void backslashify(
+ folly::StringPiece input,
+ OutputString& output,
+ bool hex_style = false);
-template <class String>
-String backslashify(const String& input, bool hex_style=false) {
- String output;
+template <class OutputString = std::string>
+OutputString backslashify(StringPiece input, bool hex_style = false) {
+ OutputString output;
backslashify(input, output, hex_style);
return output;
}
* Leaves all other characters unchanged, including those with the 0x80
* bit set.
* @param str String to convert
- * @param len Length of str, in bytes
+ * @param length Length of str, in bytes
*/
void toLowerAscii(char* str, size_t length);