MCPcopy Create free account
hub / github.com/apache/pig / encodeEscape

Method encodeEscape

test/org/apache/pig/test/Util.java:772–776  ·  view source on GitHub ↗

Helper method to replace all occurrences of "\" with "\\" in a string. This is useful to fix the file path string on Windows where "\" is used as the path separator. @param str Any string @return The resulting string

(String str)

Source from the content-addressed store, hash-verified

770 * @return The resulting string
771 */
772 public static String encodeEscape(String str) {
773 String regex = "\\\\";
774 String replacement = quoteReplacement("\\\\");
775 return str.replaceAll(regex, replacement);
776 }
777
778 public static String generateURI(String filename, PigContext context)
779 throws IOException {

Calls

no outgoing calls

Tested by

no test coverage detected