You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2023/05/29 11:07:04 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #1476: fix bad case in the format of monitor response and improve performance

git-hulk commented on code in PR #1476:
URL: https://github.com/apache/incubator-kvrocks/pull/1476#discussion_r1209201953


##########
src/common/string_util.cc:
##########
@@ -312,4 +314,47 @@ std::vector<std::string> TokenizeRedisProtocol(const std::string &value) {
   return tokens;
 }
 
+/* convert string to an escaped representation where
+ * all the non-printable characters (tested with isprint()) are turned into
+ * escapes in the form "\n\r\a...." or "\x<hex-number>". */
+std::string StringRepr(const std::string &s) {

Review Comment:
   StringRepr => EscapeString
   
   BTW, can you add the cpp test case for this function?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org