Remove all line breaks from string representation of specified object O

@param o
@return String
12456
public static String removeAllLineBreaks(Object o) {
        String s = str(o);
        return s.replaceAll("[\n\r]+", " ");
    }
588299
public static String asString(Object o) {
        if (o == null) {
            return NULL;
        } else if (o instanceof Stringable) {
            return ((Stringable) o).asString();
        } else if (o instanceof Numeric) {
            return String.format("%d", ((Numeric) o).asInteger());
        } else if (o instanceof CharSequence) {
            return String.format("\"%s\"", escape((CharSequence) o));
        } else if (o instanceof Double) {
            return asString(((Double) o).doubleValue());
        } else if (o instanceof Collection) {
            return asString((Collection<?>) o);
        } else if (o instanceof Map) {
            return asString((Map<?, ?>) o);
        } else {
            return o.toString();
        }
    }
854219
public String toJson(Object o) {
		try {
			String json = objectMapper.writeValueAsString(o);
			LOG.debug(json);
			return json;
		} catch (Exception e) {
			throw Exceptions.propagate(e);
		}
	}
279741
public static String removeNotes(String line) {
        while (true) {
            int idx = line.indexOf(PREAMBLE_STR);
            if (idx<0)  return line;
            int e = line.indexOf(POSTAMBLE_STR,idx);
            if (e<0)    return line;
            line = line.substring(0,idx)+line.substring(e+POSTAMBLE_STR.length());
        }
    }
424062
public static function cleanString($texto = '')
    {
        $texto = trim($texto);
        $aFind = ['&', 'á', 'à', 'ã', 'â', 'é', 'ê', 'í', 'ó', 'ô', 'õ', 'ú', 'ü', 'ç', 'Á', 'À', 'Ã', 'Â', 'É', 'Ê', 'Í', 'Ó', 'Ô', 'Õ', 'Ú', 'Ü', 'Ç'];
        $aSubs = ['e', 'a', 'a', 'a', 'a', 'e', 'e', 'i', 'o', 'o', 'o', 'u', 'u',
            'c', 'A', 'A', 'A', 'A', 'E', 'E', 'I', 'O', 'O', 'O', 'U', 'U', 'C', ];
        $novoTexto = str_replace($aFind, $aSubs, $texto);
        $novoTexto = preg_replace("/[^a-zA-Z0-9 @,-.;:\/]/", '', $novoTexto);

        return $novoTexto;
    }
543682
public String cleanLine(final String line) {

        String cleanedLine = extendedCleanLine(line);

        /* Right trim, no need to over burden the lexer with spaces */
        cleanedLine = ("a" + cleanedLine).trim().substring(1);
        return cleanedLine;
    }
541419
function (stringToStrip) {
            var s = stringToStrip;
            s = s.replace(/[\u00E0\u00E2\u00E4]/gi, "a");
            s = s.replace(/[\u00E9\u00E8\u00EA\u00EB]/gi, "e");
            s = s.replace(/[\u00EE\u00EF]/gi, "i");
            s = s.replace(/[\u00F4\u00F6]/gi, "o");
            s = s.replace(/[\u00F9\u00FB\u00FC]/gi, "u");
            return s;
        }
1221304
function cleanSelector (o) {
	var a = o.replace(/\s*,\s*/g, ",").replace(/\n/g, "").split(',');

	a = a.filter( function( item, index, inputArray ) {
		return inputArray.indexOf(item) == index;
	});

	return a.join(',\n');
}
1000067
@Transformer
    public static String noAccents(Object o) {
        if (null == o) return "";
        String string = o.toString();
        return Normalizer.normalize(string, Normalizer.Form.NFKC).replaceAll("[àáâãäåāąă]", "a").replaceAll("[çćčĉċ]", "c").replaceAll("[ďđð]", "d").replaceAll("[èéêëēęěĕė]", "e").replaceAll("[ƒſ]", "f").replaceAll("[ĝğġģ]", "g").replaceAll("[ĥħ]", "h").replaceAll("[ìíîïīĩĭįı]", "i").replaceAll("[ĳĵ]", "j").replaceAll("[ķĸ]", "k").replaceAll("[łľĺļŀ]", "l").replaceAll("[ñńňņŉŋ]", "n").replaceAll("[òóôõöøōőŏœ]", "o").replaceAll("[Þþ]", "p").replaceAll("[ŕřŗ]", "r").replaceAll("[śšşŝș]", "s").replaceAll("[ťţŧț]", "t").replaceAll("[ùúûüūůűŭũų]", "u").replaceAll("[ŵ]", "w").replaceAll("[ýÿŷ]", "y").replaceAll("[žżź]", "z").replaceAll("[æ]", "ae").replaceAll("[ÀÁÂÃÄÅĀĄĂ]", "A").replaceAll("[ÇĆČĈĊ]", "C").replaceAll("[ĎĐÐ]", "D").replaceAll("[ÈÉÊËĒĘĚĔĖ]", "E").replaceAll("[ĜĞĠĢ]", "G").replaceAll("[ĤĦ]", "H").replaceAll("[ÌÍÎÏĪĨĬĮİ]", "I").replaceAll("[Ĵ]", "J").replaceAll("[Ķ]", "K").replaceAll("[ŁĽĹĻĿ]", "L").replaceAll("[ÑŃŇŅŊ]", "N").replaceAll("[ÒÓÔÕÖØŌŐŎ]", "O").replaceAll("[ŔŘŖ]", "R").replaceAll("[ŚŠŞŜȘ]", "S").replaceAll("[ÙÚÛÜŪŮŰŬŨŲ]", "U").replaceAll("[Ŵ]", "W").replaceAll("[ÝŶŸ]", "Y").replaceAll("[ŹŽŻ]", "Z").replaceAll("[ß]", "ss");
    }
979462
public static function replaceAll(string $s, string $o, string $n) : string
    {
        $allPos = mb_stripos_all($s, $o);
        if (count($allPos) > 0) {
            $allPos = array_reverse($allPos);

            foreach ($allPos as $p) {
                $s = mb_substr_replace($s, $n, $p, mb_strlen($o));
            }
        }

        return $s;
    }
1371151
def without_indent(str)
      indent = str.split($/).each {|line| !line.strip.empty? }.map {|line| line.index(/[^\s]/) }.compact.min
      str.gsub(/^[[:blank:]]{#{indent}}/, '')
    end
207308
function breaklines () {
  return through2.obj(function (chunk, _, cb) {
    String(chunk)
      .split('\n')
      .filter(Boolean)
      .forEach(line => this.push(line))
    cb()
  })
}
1090530
public static String removeEmptyLine(String str) {
        assertStringNotNull(str);
        final StringBuilder sb = new StringBuilder();
        final List<String> lineList = splitList(str, "\n");
        for (String line : lineList) {
            if (is_Null_or_TrimmedEmpty(line)) {
                continue; // skip
            }
            sb.append(removeCR(line)).append("\n");
        }
        final String filtered = sb.toString();
        return filtered.substring(0, filtered.length() - "\n".length());
    }
396056
function ( obj ) {
		obj = string.trim( obj );

		return obj.charAt( 0 ).toLowerCase() + obj.slice( 1 );
	}
903390
public static String stripBraceAndQuotation(Object o) {
        if (null == o) return "";
        String s = stripBrace(o);
        s = stripQuotation(s);
        return s;
    }
167790
public static Object unwrap(Object o) {
        Wrapper w = (Wrapper) o;
        return w.unwrap();
    }
1198639
function removeLeadingLinebreaks(text) {
    let linebreak = determineLinebreaks(text);
    if (linebreak === "") return text;

    while (text.startsWith(linebreak)) {
        text = text.slice(linebreak.length);
    }

    return text;
}