public static String flatten()

in src/main/java/org/apache/sling/commons/testing/util/TestStringUtil.java [26:39]


    public static String flatten(String str) {

        // First replace native line-endings
        if(str.indexOf(NATIVE_LINE_SEP) >= 0) {
            str = str.replace(NATIVE_LINE_SEP, ".");
        }

        // Now find non-native line-endings, e.g. cygwin needs this
        if(str.indexOf('\n') >= 0) {
            str = str.replace('\n', '.');
        }

        return str;
    }