import { StringEdit } from "./stringEdit.js"; export interface PhraseRemovalOptions { /** * Whether the phrase may be removed from the start of a name that only * whitespace separates it from, as the plugin name of "Git commit" may. */ prefixAfterSpace: boolean; /** * Whether the phrase may be removed from the end of a name that only * whitespace separates it from, as "command" in "Run command" may. */ suffixAfterSpace: boolean; } /** * Removes the phrase that `pattern` finds, every time it is there, from a * command name: as a label at the start, with the separator after it, or at * the end, with the separator before it, or in brackets at either end. Where * a label at the start goes and it began with a capital, the name that is * left begins with one too. Null where the phrase is anywhere else, such as * in "Commit with Git", or nothing would be left. * * What is left is always one piece of the name, from `lo` up to `hi`, so the * labels are taken off its ends by moving those, and the name is only cut * once at the end: a name made of many labels takes linear time, not * quadratic. */ export declare function removePhrase(name: string, pattern: RegExp, options: PhraseRemovalOptions): StringEdit | null;