import type { CutFirst, EmptyTuple } from "./array.mjs"; import type { SubstractCount, ToCount } from "./number.mjs"; export declare type ExtractKey = K; export declare type EmptyString = ""; export declare type Underline = "_"; export declare type Hyphen = "-"; export declare type LowerCases = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; export declare type UpperCases = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"; export declare type Chars = LowerCases | UpperCases; export declare type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; export declare type Odds = "1" | "3" | "5" | "7" | "9"; export declare type Evens = "0" | "2" | "4" | "6" | "8"; export declare type Binary = "0" | "1"; export declare type SelectKey = K; export declare type TakeFirst = Str extends `${infer First}${string}` ? First : EmptyString; export declare type TakeRest = Str extends `${string}${infer Rest}` ? Rest : EmptyString; export declare type TakeLast = ListChar extends readonly [ ...string[], infer Last ] ? Last : EmptyString; export declare type ListChar = Str extends EmptyString ? [] : [TakeFirst, ...ListChar>]; export declare type Join = Arr extends EmptyTuple ? EmptyString : Arr extends readonly [infer T] ? T extends string ? T : never : `${Arr[0]}${Delimiter}${Join, Delimiter>}`; export declare type Split = Str extends `${infer Head}${Splitter}${infer Tail}` ? [Head, ...Split] : [Str]; declare type TitleMapFn = Arr extends readonly [string, ...infer Rest] ? Rest extends readonly string[] ? TitleMapFn<[...Result, Capitalize], Rest> : never : [Result, []]; declare type TitleMap = TitleMapFn<[], Arr>[0]; export declare type PascalCase = Join>>; declare type _Expecting = Buffer extends EmptyTuple ? Chars | Digit : Buffer[0] extends Chars ? LowerCases : Buffer[0] extends Digit ? Digit : never; declare type SplitFn = Source extends EmptyString ? Chars | Digit extends _Expecting ? Result : [...Result, Join] : TakeFirst extends Chars | Digit ? TakeFirst extends _Expecting ? SplitFn], TakeRest> : SplitFn<[...Result, Join], [], Source> : Chars | Digit extends _Expecting ? SplitFn> : SplitFn<[...Result, Join], [], TakeRest>; export declare type WordSplit = SplitFn<[], [], Str>; export declare type SnakeCase = Lowercase, Underline>>; export declare type SmallCamelCase = `${Lowercase>}${TakeRest>} >`; export declare type CamelCase = SmallCamelCase; export declare type KebabCase = Lowercase, Hyphen>>; export declare type TemplateAllowedTypes = bigint | boolean | number | string | null | undefined; export declare type StringLength = ListChar["length"]; export declare type Repeat = Join, Str>, readonly string[]>, "">; export declare type MapTupleToStrings = { [K in keyof T]: Str; }; export declare type PadStart = StringLength extends 1 ? `${Repeat, ToCount<`${StringLength}`>>>}${Src}` : string; export declare type PadEnd = StringLength extends 1 ? `${Src}${Repeat, ToCount<`${StringLength}`>>>}` : string; export {}; //# sourceMappingURL=string.d.mts.map