Skip to content

getLfNormalizedOffsetToOriginalOffsetMapper

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

Import:

import { getLfNormalizedOffsetToOriginalOffsetMapper } from 'obsidian-dev-utils/string';

Signature:

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

Parameters:

ParameterTypeDescription
$stringstring

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