/** * A pattern that finds `phrase` in a command name as whole words, in any * case: with no letter or digit right before or after it. The words of a * multi-word phrase may be separated by any whitespace. Null for a phrase * with no words, which would otherwise match everywhere. */ export declare function phrasePattern(phrase: string): RegExp | null; /** * Whether the phrase that `pattern` finds starts the command name with only * whitespace and a lower-case word after it, as the plugin name does in * "Zoom in" of the plugin "Zoom" or "Git commit" of "Git": a word of the * sentence there, the verb or the noun the command acts on, rather than a * label. */ export declare function startsWithPhraseAsWord(name: string, pattern: RegExp): boolean; /** * Whether the phrase that `pattern` finds is in the command name only as its * first word, as startsWithPhraseAsWord() has it, and nowhere else. */ export declare function hasPhraseOnlyAsWord(name: string, pattern: RegExp): boolean; /** * The words of an ID, lower-cased. An ID is an identifier rather than prose: * its words are joined by separators (`open-note`, `open_note`, `editor:open`) * or by camelCase (`openNote`, `PDFExport`), so a word is a run of letters and * digits that a separator or a camelCase hump ends. */ export declare function idWords(id: string): string[]; /** A word of an ID, lower-cased, and where it is in the ID. */ export interface IdWordSpan { word: string; start: number; end: number; } /** The words of an ID, as idWords() finds them, with where each one is. */ export declare function idWordSpans(id: string): IdWordSpan[]; /** * Where in `words` all of `wanted` first are, together and in order: the * index of the first of them, or -1. */ export declare function indexOfWords(words: readonly string[], wanted: readonly string[]): number; /** Whether `words` contain all of `wanted`, together and in order. */ export declare function containsWords(words: readonly string[], wanted: readonly string[]): boolean;