public abstract static class TruffleString.CodePointLengthNode extends Node
Node.Child, Node.Children
Modifier and Type | Method and Description |
---|---|
static TruffleString.CodePointLengthNode |
create()
Create a new
TruffleString.CodePointLengthNode . |
abstract int |
execute(AbstractTruffleString a,
TruffleString.Encoding expectedEncoding)
Return the number of codepoints in the string.
|
static TruffleString.CodePointLengthNode |
getUncached()
Get the uncached version of
TruffleString.CodePointLengthNode . |
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
public abstract int execute(AbstractTruffleString a, TruffleString.Encoding expectedEncoding)
If the string is not encoded correctly (if its coderange is TruffleString.CodeRange.BROKEN
),
every broken minimum-length sequence in the encoding (4 bytes for UTF-32, 2 bytes for
UTF-16, 1 byte for other encodings) adds 1 to the length.
public static TruffleString.CodePointLengthNode create()
TruffleString.CodePointLengthNode
.public static TruffleString.CodePointLengthNode getUncached()
TruffleString.CodePointLengthNode
.