nd4j-common/src/main/java/org/nd4j/util/StringUtils.java
public static String escapeString(
            String str, char escapeChar, char charToEscape) {
        return escapeString(str, escapeChar, new char[] {charToEscape});
    }
public static String escapeString(
            String str, char escapeChar, char charToEscape) {
        return escapeString(str, escapeChar, new char[] {charToEscape});
    }
Escape <code>charToEscape</code> in the string
with the escape char <code>escapeChar</code>

@param str string
@param escapeChar escape char
@param charToEscape the char to be escaped
@return an escaped string