export declare function sanitizeFileName(value: string): string; export declare function trimNonEmpty(value: string | null | undefined): string | undefined; export declare function truncateStr(str: string, maxLen: number): string; export declare function truncateSplit(str?: string, splitBy?: string, maxLen?: number): string; export declare function maskSecret(value: string): string; /** * Strip a leading UTF-8 byte order mark (BOM, U+FEFF) from decoded text. * * Text editors on Windows (e.g. Notepad's "UTF-8" encoding option) prepend this mark to * signal the encoding, but `fs.readFileSync(path, "utf8")` does not strip it, so it survives * into the decoded string as a leading `\uFEFF` character. Frontmatter parsers anchor on * `^---` and silently fail to match when that character is present, hiding the file's * name/description (see cline/cline#12151). * * We only need to check for this one mark: a BOM disambiguates byte order for multi-byte * code units (UTF-16, UTF-32), but UTF-8 is a byte-oriented encoding with no byte-order * ambiguity to resolve, so it has exactly one BOM encoding (`EF BB BF`, i.e. U+FEFF) rather * than a family of them. Every caller of this helper already reads its input as `utf8`, so a * file actually encoded as UTF-16/32 would be mis-decoded well before reaching here. */ export declare function stripUtf8Bom(text: string): string;