Theia API Documentation v1.70.0
    Preparing search index...
    • Tests whether pattern is a "prefix match" for text, accounting for punctuation-separated segments.

      The pattern is split on punctuation into query parts. The text is split on punctuation into segments. It is a prefix match when the first query part matches the start of segment 0, and each subsequent query part matches the start of a later segment, in order.

      Examples:

      • hasPrefixMatch("workspace-server", "works-ser") → true
      • hasPrefixMatch("backend-workspace-service", "works-ser") → false (first segment doesn't match)
      • hasPrefixMatch("fontSize", "font") → true (single-part prefix)

      Parameters

      • text: string
      • pattern: string

      Returns boolean