We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// your answers type FirstCharOf<S extends string> = S extends `${infer C}${any}` ? C : '' type LengthOf<S extends string, Result extends 0[] = []> = S extends `${any}${infer Rest}` ? LengthOf<Rest, [0, ...Result]> : Result['length'] type FindAll<T extends string, P extends string, Result extends number[] = [], Scanned extends string = ''> = P extends '' ? [] : T extends `${Scanned}${infer Head}${P}${infer Tail}` ? FindAll<T, P, [...Result, LengthOf<`${Scanned}${Head}`>], `${Scanned}${Head}${FirstCharOf<P>}`> : Result
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: