IFClite TypeScript API
    Preparing search index...

    Class StringTable

    String table - deduplicated string storage Reduces memory by storing each unique string once

    Index
    NULL_INDEX: -1
    • get count(): number

      Returns number

    • Get string by index

      Parameters

      • idx: number

      Returns string

    • Get all strings (for debugging/export)

      Returns string[]

    • Check if string exists

      Parameters

      • value: string

      Returns boolean

    • Get index of string (returns -1 if not found)

      Parameters

      • value: string

      Returns number

    • Intern string (add if not exists, return index)

      Parameters

      • value: string | null | undefined

      Returns number

    • Reconstruct a StringTable from a flat array as produced by getAll().

      Used by the parser-worker → main thread transport so a complete table round-trips without re-interning each string at every call site. The first slot must be the canonical empty string at index 0.

      Parameters

      • strings: string[]

      Returns StringTable