@alpaca-software/40kdc-data
    Preparing search index...

    Function stripLeadingThe

    • Strip a leading "The " (case-insensitive, after trimming) from a display name, returning the remainder. Returns null when there is no leading "The " to strip, so callers can cheaply tell whether a retry is worthwhile.

      Used only by roster import to bridge the leading-article mismatch between data names and roster exports in BOTH directions ("The Bloody Twins" ↔ "Bloody Twins", "Fire Axe" ↔ "The Fire Axe"). This is deliberately NOT folded into normalizeName: that key is shared by unit, faction, and ability lookup, where dropping a leading "The" would collide distinct entities (e.g. "The Emperor's Champion").

      Parameters

      • input: string

      Returns string | null

      stripLeadingThe("The Bloody Twins"); // "Bloody Twins"
      stripLeadingThe("Bloody Twins"); // null