Class TruffleString.IndexOfStringNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.IndexOfStringNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
TruffleString
Node to find the index of the first occurrence of a given string. See
execute(AbstractTruffleString, AbstractTruffleString, int, int, TruffleString.Encoding)
for details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a newTruffleString.IndexOfStringNode
.abstract int
execute
(AbstractTruffleString a, AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Return the codepoint index of the first occurrence ofstring
, bounded byfromIndex
(inclusive) andtoIndex
(exclusive), if no occurrence is found return a negative value.Get the uncached version ofTruffleString.IndexOfStringNode
.Methods inherited from class 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, reportReplace, toString
-
Method Details
-
execute
public abstract int execute(AbstractTruffleString a, AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Return the codepoint index of the first occurrence ofstring
, bounded byfromIndex
(inclusive) andtoIndex
(exclusive), if no occurrence is found return a negative value.- Since:
- 22.1
-
create
Create a newTruffleString.IndexOfStringNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.IndexOfStringNode
.- Since:
- 22.1
-