sedadgn commented on a change in pull request #5458: URL: https://github.com/apache/nifi/pull/5458#discussion_r736481331
########## File path: nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/StringUtils.java ########## @@ -510,4 +514,20 @@ public static String toTitleCase(String input) { .map(word -> Character.toTitleCase(word.charAt(0)) + word.substring(1)) .collect(Collectors.joining(" ")); } + + public static String escapeString(String str, char escapeChar, char charToEscape) { + if (str == null) { Review comment: The idea was, that escape followed by unescape always produces the original string. E.g. unescape(escape("a,b" )) == "a,b". If the original string is already escaped, then the end result is an escaped string. E.g. unescape(escape("a,\,b" )) == "a,\,b". That would not work if we perform the check you suggested. We can add the check if you want, to. For our specific problems, it would work either way. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org