“JavaScript Remova a nova linha final da string” Respostas de código

JavaScript Remova quebras de linha da string

var stringWithLineBreaks = `
O boy 
I've got 
Breaks
`;
var stringWithoutLineBreaks = stringWithLineBreaks.replace(/(\r\n|\n|\r)/gm, "");//remove those line breaks
Grepper

Como remover todo o espaço em branco da String java

st = st.replaceAll("\\s+","")
a PROgrammer

Java 8 Remova os espaços da corda

a.replaceAll("\\s+","");
2 Programmers 1 Bug

JavaScript Remova a nova linha final da string

// Remove the trailing newline(s) from a string
str.replace(/\n*$/, "");
Tukusej’s Sirs

Respostas semelhantes a “JavaScript Remova a nova linha final da string”

Perguntas semelhantes a “JavaScript Remova a nova linha final da string”

Mais respostas relacionadas para “JavaScript Remova a nova linha final da string” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código