/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Readers for the three French postal-line shapes that the FINESS and Annuaire de l'éducation * publications share: the La Poste routing line (`97100 BASSE TERRE`, `97331 CAYENNE CEDEX`), a * line holding a post-office box among other text (`ZA ESPERANCE - BP 26`), and the comparison of * two place names written in different forms (`ST PIERRE` against `Saint-Pierre`). * * Both adapters read French overseas registers, and both publishers write these lines the same * way, so the readers live in one module rather than in each adapter. */ /** * A routing line split into the components the French address layout prints on its last line. */ export interface AcheminementLine { postcode: string; locality: string; /** * The `CEDEX` phrase with its office number, as written, when the line ends with one. */ cedex?: string; } /** * Split a La Poste routing line into postcode, locality and an optional trailing `CEDEX`. * * Returns `null` when the line does not open with a five-digit postcode, * holds no locality after it, or holds `CEDEX` anywhere but at its end, because none * of those is a routing line the French layout can print. */ export declare function parseAcheminementLine(line: string): AcheminementLine | null; /** * A line with its post-office box taken out. */ export interface PostBoxSplit { /** * The box as written, with its whitespace collapsed, or `null` where the line holds none. */ poBox: string | null; /** * What the line holds besides the box, with the separators around it removed. */ remainder: string; } /** * Take the first post-office box out of a line. * * `SAVANNAH BP 90149` yields `BP 90149` and `SAVANNAH`, and `BP 381-SPRING CONCORDIA -` * yields `BP 381` and `SPRING CONCORDIA`. */ export declare function splitPostBox(line: string): PostBoxSplit; /** * Whether a line locates part of a building or a landmark rather than a place. */ export declare function isPremiseDescriptor(line: string): boolean; /** * Whether two place names write the same place: `ST PIERRE` and `Saint-Pierre`, `MATA'UTU` and `Mata Utu`. */ export declare function isSamePlace(left: string, right: string): boolean; //# sourceMappingURL=postal-lines.d.ts.map