Class TruffleString.CodePointSet
java.lang.Object
com.oracle.truffle.api.strings.TruffleString.CodePointSet
- Enclosing class:
TruffleString
A set of codepoints in a given encoding. Used in
TruffleString.ByteIndexOfCodePointSetNode.execute(AbstractTruffleString, int, int, TruffleString.CodePointSet).- Since:
- 23.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic TruffleString.CodePointSetfromRanges(int[] ranges, TruffleString.Encoding encoding) Creates a newTruffleString.CodePointSetfrom the given list of ranges.booleanisIntrinsicCandidate(TruffleString.CodeRange codeRange) ReturnstrueifTruffleString.ByteIndexOfCodePointSetNodemay implement the search for this particular code point set in strings with the given code range by dispatching to a compiler intrinsic.
-
Method Details
-
fromRanges
Creates a newTruffleString.CodePointSetfrom 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
ReturnstrueifTruffleString.ByteIndexOfCodePointSetNodemay 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
-