/** * True for a word that's already an ALL-CAPS acronym (2+ letters, e.g. * 'API', 'HTML5') -- both styles leave these exactly as written rather * than lowercasing or capitalizing them. Non-letter characters (digits) * don't count toward the length or case check. */ export declare function isAllCapsWord(word: string): boolean; /** The `v2` of `v2.0`, or `v3`. The `v` must be the whole alphabetic part, * so an ordinary word like `vector3` is untouched. */ export declare function isVersionToken(word: string): boolean; /** `x-metadata`, `x-codeSamples`. Case-sensitive: matching `X-` too would * freeze `X-ray` and AWS `X-Ray`. */ export declare function isVendorExtensionToken(word: string): boolean; /** Tokens whose own casing is already correct. Must be checked before * hyphen splitting -- an extension's `-` is part of its name. */ export declare function keepsOwnCasing(word: string): boolean; export interface ExceptionPlan { wordMap: Map; phrases: string[]; } export declare function buildExceptionPlan(exceptions: string[]): ExceptionPlan; /** * Rebuilds `text` with every word re-cased by `caseWord`, which receives the * word, its `index`, the sequence `total`, and whether it opens a sentence. * Separators are copied through verbatim. * * Phrase-exception and mask tokens are emitted as-written but still OCCUPY an * index, so a leading one cannot hand position 0 to a neighbour (#25610). * * Shared by apTitleCase/chicagoTitleCase and capitalization.ts's sentenceCase. * Length-preserving whenever `caseWord` is. */ export declare function recaseWords(text: string, phrases: string[], caseWord: (word: string, index: number, total: number, startsSentence: boolean) => string): string; /** * AP style: lowercases articles, coordinating conjunctions, and * prepositions of 3 letters or fewer -- everything else is capitalized, * except `exceptions` (kept as-written) and ALL-CAPS words (left alone). * The first and last word are always capitalized. */ export declare function apTitleCase(text: string, exceptions?: string[]): string; /** * Chicago style: like AP, but lowercases EVERY preposition regardless of * length (not just the 3-letters-or-fewer ones AP lowercases). */ export declare function chicagoTitleCase(text: string, exceptions?: string[]): string; //# sourceMappingURL=title-case.d.ts.map