drupflare/worker - v1.0.0
    Preparing search index...

    Function sliceLiteral

    • Cuts an encoded literal into pieces each of which fits the budget.

      Splits INSIDE the quotes and keeps each piece a valid literal of the same kind, so concatenating them reproduces the value exactly. A hex literal x'..' is cut on BYTE boundaries -- an odd cut would produce an invalid hex string -- and a text literal is cut on whole characters so a multi-byte sequence is never halved.

      Parameters

      • literal: string
      • budget: number

      Returns string[]