Class TruffleString.CodePointSet

java.lang.Object
com.oracle.truffle.api.strings.TruffleString.CodePointSet
Enclosing class:
TruffleString

public static final class TruffleString.CodePointSet extends Object
Since:
23.0
  • Method Details

    • fromRanges

      public static TruffleString.CodePointSet fromRanges(int[] ranges, TruffleString.Encoding encoding)
      Creates a new TruffleString.CodePointSet from the given list of ranges. This operation is expensive, it is recommended to cache the result.
      Parameters:
      ranges - a sorted list of non-adjacent codepoint ranges. For every two consecutive array elements, the first is interpreted as the range's inclusive lower bound, and the second element is the range's inclusive upper bound. Example: an array [1, 4, 8, 10] represents the inclusive ranges [1-4] and [8-10].
      Since:
      23.0
    • isIntrinsicCandidate

      public boolean isIntrinsicCandidate(TruffleString.CodeRange codeRange)
      Returns true if TruffleString.ByteIndexOfCodePointSetNode may implement the search for this particular code point set in strings with the given code range by dispatching to a compiler intrinsic.
      Since:
      23.0