crlfToLf

crlfToLf

Converts crlf to lf

Import

import { crlfToLf } from '@fullstacksjs/toolbox';

Signature

function crlfToLf(str: string): string {}

Examples

crlfToLf('hello world\r\n')   // 'hello world\n'
crlfToLf('hello world\r\n\n') // 'hello world\n\n'
crlfToLf('hello world\n')     // 'hello world\n'
crlfToLf('hello world')       // 'hello world'
crlfToLf('')                  // ''
crlfToLf(' ')                 // ' '