Skip to content

getLfNormalizedOffsetToOriginalOffsetMapper

Returns a function that maps LF-normalized offsets to original offsets.

Import:

import { getLfNormalizedOffsetToOriginalOffsetMapper } from '@mnaoumov/typescript-lib/string';

Signature:

function getLfNormalizedOffsetToOriginalOffsetMapper($string: string): (lfOffset: number) => number

Parameters:

Parameter Type Description
$string string

Returns: (lfOffset: number) => number — A function that maps LF-normalized offsets to original offsets.