Skip to content

21104 - FindAll #32276

Closed
Closed

Description

@PassionZale
type FindAll<
  T extends string,
  P extends string,
  L extends 0[] = []
> = P extends ""
  ? []
  : T extends `${string}${infer R}`
  ? [
      ...(T extends `${P}${string}` ? [L["length"]] : []),
      ...FindAll<R, P, [0, ...L]>
    ]
  : [];

Activity

  1. added
    answer
    zh-CN
    on Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    21104answerzh-CN

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions