/** * Trim the left side of a string. * @param Str - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. */ export type TrimLeft = Str extends `${Sep}${infer Rest}` ? TrimLeft : Str; /** * Trim the right side of a string. * @param Str - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. */ export type TrimRight = Str extends `${infer Rest}${Sep}` ? TrimRight : Str; /** * Trim a string. * @param Str - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. */ export type Trim = TrimLeft, Sep>;