Skip to content

removeNewLine

\n, \r 문자를 제거하거나 지정된 문자로 대체합니다.

Parameters

이름타입필수기본값
strstring
replaceTonamedstring''

named 표시가 있는 파라미터는 Dart에서는 named 파라미터, Python에서는 키워드 인자로 전달됩니다.

Returns

string

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'

Released under the MIT License