Skip to content

webshrine / stdtyp/src / Split

Type Alias: Split<T, Separator>

Split<T, Separator>: string extends T ? string[] : T extends "" ? [] : T extends `${infer T}${Separator}${infer U}` ? [T, ...Split<U, Separator>] : [T]

Type Parameters

T extends string

Separator extends string

Defined in

packages/stdtyp/src/utilities/other.ts:99