Package com.oracle.truffle.api.strings
Class TruffleString.LastIndexOfStringNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.LastIndexOfStringNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to find the index of the last 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 com.oracle.truffle.api.nodes.Node
Node.Child, Node.Children
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a newTruffleString.LastIndexOfStringNode
.abstract int
execute
(AbstractTruffleString a, AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Return the codepoint index of the last occurrence ofstring
, bounded byfromIndex
(exclusive upper limit) andtoIndex
(inclusive lower limit), if no occurrence is found return a negative value.Get the uncached version ofTruffleString.LastIndexOfStringNode
.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, 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 last occurrence ofstring
, bounded byfromIndex
(exclusive upper limit) andtoIndex
(inclusive lower limit), if no occurrence is found return a negative value.- Since:
- 22.1
-
create
Create a newTruffleString.LastIndexOfStringNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.LastIndexOfStringNode
.- Since:
- 22.1
-