티스토리 뷰

공부

[Java] new line replacement

승가비 2021. 9. 5. 19:11
728x90
public static String escape(String s) {
    return s
            .replaceAll("\n", "")
            .replaceAll("\r", "");
}

https://stackoverflow.com/questions/5658134/java-new-line-replacement/68901397#68901397

 

java new line replacement

I am wondering about why I don't get the expected result with this one: String t = "1302248663033 "; t.replaceAll("\n", "...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[Mac] Terminal Hostname 변경  (0) 2021.09.05
[Python] IsPrime  (0) 2021.09.05
[Java] How to forward large files with RestTemplate?  (0) 2021.09.05
[Python] Tensorflow v1 (env v2)  (0) 2021.08.13
clazz vs klass (clazz!)  (0) 2021.08.13
댓글