removeNewLine
\n, \r 문자를 제거하거나 지정된 문자로 대체합니다.
Parameters
| 이름 | 타입 | 필수 | 기본값 |
|---|---|---|---|
str | stringStringstr | ● | – |
replaceTo named keyword | stringStringstr | – | '' |
named이 파라미터는 named 파라미터로 전달합니다.
keyword이 파라미터는 키워드 인자로 전달하거나, 대신 dict 하나로 전달합니다.
Returns
string
String
str
Examples
javascript
removeNewLine('ab\ncd'); // Returns 'abcd'
removeNewLine('ab\r\ncd', '-'); // Returns 'ab-cd'dart
removeNewLine('ab\ncd'); // Returns 'abcd'
removeNewLine('ab\r\ncd', replaceTo: '-'); // Returns 'ab-cd'python
removeNewLine('ab\ncd') # Returns 'abcd'
removeNewLine('ab\r\ncd', '-') # Returns 'ab-cd'