import { Range } from "vscode-languageserver-protocol";
export declare function escapeRegExp(s: string): string;
export type Occurrence = {
    line: number;
    character: number;
    length: number;
};
export declare function occurrenceToRange(occ: Occurrence): Range;
/**
 * Compute the character offset of the start of the given line without splitting.
 */
export declare function offsetOfLine(source: string, line: number): number;
/**
 * Find all whole-word occurrences of `word` in `source`.
 * Known limitation: matches inside string literals and comments.
 */
export declare function findAllOccurrences(source: string, word: string): Occurrence[];
