Package com.oracle.truffle.api.strings
Class TruffleString.IndexOfCodePointNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.IndexOfCodePointNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to find the index of the first occurrence of a given code point. See
execute(AbstractTruffleString, int, int, int, TruffleString.Encoding)
for details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
Node.Child, Node.Children
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a newTruffleString.IndexOfCodePointNode
.abstract int
execute
(AbstractTruffleString a, int codepoint, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Return the codepoint index of the first occurrence ofcodepoint
, bounded byfromIndex
(inclusive) andtoIndex
(exclusive), if no occurrence is found return a negative value.Get the uncached version ofTruffleString.IndexOfCodePointNode
.Methods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toString
-
Method Details
-
execute
public abstract int execute(AbstractTruffleString a, int codepoint, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Return the codepoint index of the first occurrence ofcodepoint
, bounded byfromIndex
(inclusive) andtoIndex
(exclusive), if no occurrence is found return a negative value.- Since:
- 22.1
-
create
Create a newTruffleString.IndexOfCodePointNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.IndexOfCodePointNode
.- Since:
- 22.1
-