Package com.oracle.truffle.api.strings
Class AbstractTruffleString
java.lang.Object
com.oracle.truffle.api.strings.AbstractTruffleString
- Direct Known Subclasses:
MutableTruffleString
,TruffleString
public abstract sealed class AbstractTruffleString
extends Object
permits TruffleString, MutableTruffleString
Abstract base class for Truffle strings. Useful when a value can be both a
TruffleString
or a MutableTruffleString
. Note that values of this type are not valid interop values.
They must be converted to TruffleString
before passing them to other languages.- Since:
- 22.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal MutableTruffleString
asManagedMutableTruffleStringUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.AsManagedNode
.final TruffleString
asManagedTruffleStringUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.AsManagedNode
.final TruffleString
asManagedTruffleStringUncached
(TruffleString.Encoding expectedEncoding, boolean cacheResult) Shorthand for calling the uncached version ofTruffleString.AsManagedNode
.final MutableTruffleString
asMutableTruffleStringUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofMutableTruffleString.AsMutableTruffleStringNode
.final TruffleString
asTruffleStringUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.FromByteArrayNode
.final int
byteIndexOfAnyByteUncached
(int fromByteIndex, int maxByteIndex, byte[] values, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfAnyByteNode
.final int
byteIndexOfCodePointUncached
(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfCodePointNode
.final int
byteIndexOfStringUncached
(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfStringNode
.final int
byteIndexOfStringUncached
(TruffleString.WithMask b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfStringNode
.final int
byteIndexToCodePointIndexUncached
(int byteOffset, int byteIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexToCodePointIndexNode
.final int
byteLength
(TruffleString.Encoding expectedEncoding) Get this string's length in bytes.final int
byteLengthOfCodePointUncached
(int byteIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointIndexToByteIndexNode
.final int
byteLengthOfCodePointUncached
(int byteIndex, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling) Shorthand for calling the uncached version ofTruffleString.CodePointIndexToByteIndexNode
.final int
charIndexOfAnyCharUTF16Uncached
(int fromCharIndex, int maxCharIndex, char[] values) Shorthand for calling the uncached version ofTruffleString.CharIndexOfAnyCharUTF16Node
.final int
codePointAtByteIndexUncached
(int i, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointAtByteIndexNode
.final int
codePointAtByteIndexUncached
(int i, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling) Shorthand for calling the uncached version ofTruffleString.CodePointAtByteIndexNode
.final int
codePointAtIndexUncached
(int i, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointAtIndexNode
.final int
codePointAtIndexUncached
(int i, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling) Shorthand for calling the uncached version ofTruffleString.CodePointAtIndexNode
.final int
codePointIndexToByteIndexUncached
(int byteOffset, int codepointIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointIndexToByteIndexNode
.final int
codePointLengthUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointLengthNode
.final boolean
codeRangeEqualsUncached
(TruffleString.CodeRange otherCodeRange) Shorthand for calling the uncached version ofTruffleString.CodeRangeEqualsNode
.final int
compareBytesUncached
(AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CompareBytesNode
.final int
Shorthand for calling the uncached version ofTruffleString.CompareCharsUTF16Node
.final int
Shorthand for calling the uncached version ofTruffleString.CompareIntsUTF32Node
.final TruffleString
concatUncached
(AbstractTruffleString b, TruffleString.Encoding expectedEncoding, boolean lazy) Shorthand for calling the uncached version ofTruffleString.ConcatNode
.final void
copyToByteArrayNodeUncached
(int byteFromIndexA, byte[] dst, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Deprecated.final void
copyToByteArrayUncached
(int byteFromIndexA, byte[] dst, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CopyToByteArrayNode
.final byte[]
copyToByteArrayUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CopyToByteArrayNode
.final void
copyToNativeMemoryNodeUncached
(int byteFromIndexA, Object pointerObject, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Deprecated.since 22.3, usecopyToNativeMemoryUncached(int, Object, int, int, Encoding)
instead.final void
copyToNativeMemoryUncached
(int byteFromIndexA, Object pointerObject, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CopyToNativeMemoryNode
.final TruffleStringIterator
createBackwardCodePointIteratorUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CreateBackwardCodePointIteratorNode
.final TruffleStringIterator
createCodePointIteratorUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CreateCodePointIteratorNode
.final boolean
Returnstrue
if this string is equal toobj
.final boolean
equalsUncached
(AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.EqualNode
.final TruffleString
forceEncodingUncached
(TruffleString.Encoding expectedEncoding, TruffleString.Encoding targetEncoding) Shorthand for calling the uncached version ofTruffleString.ForceEncodingNode
.final TruffleString.CodeRange
getByteCodeRangeUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetByteCodeRangeNode
.final TruffleString.CodeRange
getCodeRangeImpreciseUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetCodeRangeImpreciseNode
.final TruffleString.CodeRange
getCodeRangeUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetCodeRangeNode
.final InternalByteArray
getInternalByteArrayUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetInternalByteArrayNode
.final Object
getInternalNativePointerUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetInternalNativePointerNode
.getStringCompactionLevelUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetStringCompactionLevelNode
.final int
hashCode()
Returns this string's hashcode.final int
hashCodeUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.HashCodeNode
.final int
indexOfCodePointUncached
(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.IndexOfCodePointNode
.final int
indexOfStringUncached
(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.IndexOfStringNode
.final int
intIndexOfAnyIntUTF32Uncached
(int fromIntIndex, int maxIntIndex, int[] values) Shorthand for calling the uncached version ofTruffleString.IntIndexOfAnyIntUTF32Node
.final boolean
isCompatibleTo
(TruffleString.Encoding expectedEncoding) Deprecated.useisCompatibleToUncached(Encoding)
instead.final boolean
isCompatibleToUncached
(TruffleString.Encoding expectedEncoding) Returnstrue
if this string is compatible to the given encoding.final boolean
isEmpty()
Returnstrue
if this string is empty.final boolean
Returnstrue
if this string is immutable, i.e.final boolean
Returnstrue
if this string is not backed by a native pointer.final boolean
Returnstrue
if this string is mutable, i.e.final boolean
isNative()
Returnstrue
if this string is backed by a native pointer.final boolean
isValidUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.IsValidNode
.final int
lastByteIndexOfCodePointUncached
(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastByteIndexOfCodePointNode
.final int
lastByteIndexOfStringUncached
(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastByteIndexOfStringNode
.final int
lastByteIndexOfStringUncached
(TruffleString.WithMask b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastByteIndexOfStringNode
.final int
lastIndexOfCodePointUncached
(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastIndexOfCodePointNode
.final int
lastIndexOfStringUncached
(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastIndexOfStringNode
.void
materializeUncached
(AbstractTruffleString a, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.MaterializeNode
.final double
Shorthand for calling the uncached version ofTruffleString.ParseDoubleNode
.final int
Shorthand for calling the uncached version ofTruffleString.ParseIntNode
.final int
parseIntUncached
(int radix) Shorthand for calling the uncached version ofTruffleString.ParseIntNode
.final long
Shorthand for calling the uncached version ofTruffleString.ParseLongNode
.final long
parseLongUncached
(int radix) Shorthand for calling the uncached version ofTruffleString.ParseLongNode
.final int
readByteUncached
(int i, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ReadByteNode
.final int
readCharUTF16Uncached
(int i) Shorthand for calling the uncached version ofTruffleString.ReadCharUTF16Node
.final boolean
regionEqualByteIndexUncached
(int fromByteIndexA, AbstractTruffleString b, int fromByteIndexB, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RegionEqualByteIndexNode
.final boolean
regionEqualByteIndexUncached
(int fromByteIndexA, TruffleString.WithMask b, int fromByteIndexB, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RegionEqualByteIndexNode
.final boolean
regionEqualsUncached
(int fromIndexA, AbstractTruffleString b, int fromIndexB, int regionLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RegionEqualNode
.final TruffleString
repeatUncached
(int n, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RepeatNode
.final TruffleString
substringByteIndexUncached
(int fromByteIndex, int byteLength, TruffleString.Encoding expectedEncoding, boolean lazy) Shorthand for calling the uncached version ofTruffleString.SubstringByteIndexNode
.final TruffleString
substringUncached
(int fromIndex, int substringLength, TruffleString.Encoding expectedEncoding, boolean lazy) Shorthand for calling the uncached version ofTruffleString.SubstringNode
.final TruffleString
switchEncodingUncached
(TruffleString.Encoding targetEncoding) Shorthand for calling the uncached version ofTruffleString.SwitchEncodingNode
.final TruffleString
switchEncodingUncached
(TruffleString.Encoding targetEncoding, TranscodingErrorHandler errorHandler) Shorthand for calling the uncached version ofTruffleString.SwitchEncodingNode
.final String
Shorthand for calling the uncached version ofTruffleString.ToJavaStringNode
.final String
toString()
Returns aString
representation of this string.final String
Returns debug information about this string.toValidStringUncached
(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ToValidStringNode
.
-
Method Details
-
isEmpty
public final boolean isEmpty()Returnstrue
if this string is empty. This method is allowed to be used on fast paths.- Since:
- 22.1
-
byteLength
Get this string's length in bytes. This method is allowed to be used on fast paths.- Since:
- 22.1
-
isCompatibleTo
@Deprecated(since="23.0") public final boolean isCompatibleTo(TruffleString.Encoding expectedEncoding) Deprecated.useisCompatibleToUncached(Encoding)
instead.Returnstrue
if this string is compatible to the given encoding.- Since:
- 22.1
-
isCompatibleToUncached
Returnstrue
if this string is compatible to the given encoding. Compatible forTruffleString
means it is byte-equivalent in both the encoding used to create this string and the given encoding. ForMutableTruffleString
this method only returned true if the passed encoding is the same encoding used to create this string.- Since:
- 23.0
-
isManaged
public final boolean isManaged()Returnstrue
if this string is not backed by a native pointer.- Since:
- 22.1
-
isNative
public final boolean isNative()Returnstrue
if this string is backed by a native pointer.- Since:
- 22.1
-
isImmutable
public final boolean isImmutable()Returnstrue
if this string is immutable, i.e. an instance ofTruffleString
.- Since:
- 22.1
-
isMutable
public final boolean isMutable()Returnstrue
if this string is mutable, i.e. an instance ofMutableTruffleString
.- Since:
- 22.1
-
asTruffleStringUncached
Shorthand for calling the uncached version ofTruffleString.FromByteArrayNode
.- Since:
- 22.1
-
asManagedTruffleStringUncached
Shorthand for calling the uncached version ofTruffleString.AsManagedNode
.- Since:
- 22.1
-
asManagedTruffleStringUncached
public final TruffleString asManagedTruffleStringUncached(TruffleString.Encoding expectedEncoding, boolean cacheResult) Shorthand for calling the uncached version ofTruffleString.AsManagedNode
.- Since:
- 23.0
-
asMutableTruffleStringUncached
public final MutableTruffleString asMutableTruffleStringUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofMutableTruffleString.AsMutableTruffleStringNode
.- Since:
- 22.1
-
asManagedMutableTruffleStringUncached
public final MutableTruffleString asManagedMutableTruffleStringUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.AsManagedNode
.- Since:
- 22.1
-
materializeUncached
Shorthand for calling the uncached version ofTruffleString.MaterializeNode
.- Since:
- 23.1
-
getCodeRangeUncached
Shorthand for calling the uncached version ofTruffleString.GetCodeRangeNode
.- Since:
- 22.1
-
getCodeRangeImpreciseUncached
public final TruffleString.CodeRange getCodeRangeImpreciseUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetCodeRangeImpreciseNode
.- Since:
- 23.0
-
getByteCodeRangeUncached
public final TruffleString.CodeRange getByteCodeRangeUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetByteCodeRangeNode
.- Since:
- 22.1
-
codeRangeEqualsUncached
Shorthand for calling the uncached version ofTruffleString.CodeRangeEqualsNode
.- Since:
- 22.1
-
isValidUncached
Shorthand for calling the uncached version ofTruffleString.IsValidNode
.- Since:
- 22.1
-
getStringCompactionLevelUncached
public final TruffleString.CompactionLevel getStringCompactionLevelUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetStringCompactionLevelNode
.- Since:
- 23.0
-
codePointLengthUncached
Shorthand for calling the uncached version ofTruffleString.CodePointLengthNode
.- Since:
- 22.1
-
hashCodeUncached
Shorthand for calling the uncached version ofTruffleString.HashCodeNode
.- Since:
- 22.1
-
readByteUncached
Shorthand for calling the uncached version ofTruffleString.ReadByteNode
.- Since:
- 22.1
-
readCharUTF16Uncached
public final int readCharUTF16Uncached(int i) Shorthand for calling the uncached version ofTruffleString.ReadCharUTF16Node
.- Since:
- 22.1
-
byteLengthOfCodePointUncached
public final int byteLengthOfCodePointUncached(int byteIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointIndexToByteIndexNode
.- Since:
- 22.1
-
byteLengthOfCodePointUncached
public final int byteLengthOfCodePointUncached(int byteIndex, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling) Shorthand for calling the uncached version ofTruffleString.CodePointIndexToByteIndexNode
.- Since:
- 22.3
-
byteIndexToCodePointIndexUncached
public final int byteIndexToCodePointIndexUncached(int byteOffset, int byteIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexToCodePointIndexNode
.- Since:
- 22.2
-
codePointIndexToByteIndexUncached
public final int codePointIndexToByteIndexUncached(int byteOffset, int codepointIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CodePointIndexToByteIndexNode
.- Since:
- 22.1
-
codePointAtIndexUncached
Shorthand for calling the uncached version ofTruffleString.CodePointAtIndexNode
.- Since:
- 22.1
-
codePointAtIndexUncached
public final int codePointAtIndexUncached(int i, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling) Shorthand for calling the uncached version ofTruffleString.CodePointAtIndexNode
.- Since:
- 22.3
-
codePointAtByteIndexUncached
Shorthand for calling the uncached version ofTruffleString.CodePointAtByteIndexNode
.- Since:
- 22.1
-
codePointAtByteIndexUncached
public final int codePointAtByteIndexUncached(int i, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling) Shorthand for calling the uncached version ofTruffleString.CodePointAtByteIndexNode
.- Since:
- 22.3
-
byteIndexOfAnyByteUncached
public final int byteIndexOfAnyByteUncached(int fromByteIndex, int maxByteIndex, byte[] values, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfAnyByteNode
.- Since:
- 22.1
-
charIndexOfAnyCharUTF16Uncached
public final int charIndexOfAnyCharUTF16Uncached(int fromCharIndex, int maxCharIndex, char[] values) Shorthand for calling the uncached version ofTruffleString.CharIndexOfAnyCharUTF16Node
.- Since:
- 22.1
-
intIndexOfAnyIntUTF32Uncached
public final int intIndexOfAnyIntUTF32Uncached(int fromIntIndex, int maxIntIndex, int[] values) Shorthand for calling the uncached version ofTruffleString.IntIndexOfAnyIntUTF32Node
.- Since:
- 22.1
-
indexOfCodePointUncached
public final int indexOfCodePointUncached(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.IndexOfCodePointNode
.- Since:
- 22.1
-
byteIndexOfCodePointUncached
public final int byteIndexOfCodePointUncached(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfCodePointNode
.- Since:
- 22.1
-
lastIndexOfCodePointUncached
public final int lastIndexOfCodePointUncached(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastIndexOfCodePointNode
.- Since:
- 22.1
-
lastByteIndexOfCodePointUncached
public final int lastByteIndexOfCodePointUncached(int cp, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastByteIndexOfCodePointNode
.- Since:
- 22.1
-
indexOfStringUncached
public final int indexOfStringUncached(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.IndexOfStringNode
.- Since:
- 22.1
-
byteIndexOfStringUncached
public final int byteIndexOfStringUncached(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfStringNode
.- Since:
- 22.1
-
byteIndexOfStringUncached
public final int byteIndexOfStringUncached(TruffleString.WithMask b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.ByteIndexOfStringNode
.- Since:
- 22.1
-
lastIndexOfStringUncached
public final int lastIndexOfStringUncached(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastIndexOfStringNode
.- Since:
- 22.1
-
lastByteIndexOfStringUncached
public final int lastByteIndexOfStringUncached(AbstractTruffleString b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastByteIndexOfStringNode
.- Since:
- 22.1
-
lastByteIndexOfStringUncached
public final int lastByteIndexOfStringUncached(TruffleString.WithMask b, int fromIndex, int toIndex, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.LastByteIndexOfStringNode
.- Since:
- 22.1
-
compareBytesUncached
public final int compareBytesUncached(AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CompareBytesNode
.- Since:
- 22.1
-
compareCharsUTF16Uncached
Shorthand for calling the uncached version ofTruffleString.CompareCharsUTF16Node
.- Since:
- 22.1
-
compareIntsUTF32Uncached
Shorthand for calling the uncached version ofTruffleString.CompareIntsUTF32Node
.- Since:
- 22.1
-
regionEqualsUncached
public final boolean regionEqualsUncached(int fromIndexA, AbstractTruffleString b, int fromIndexB, int regionLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RegionEqualNode
.- Since:
- 22.1
-
regionEqualByteIndexUncached
public final boolean regionEqualByteIndexUncached(int fromByteIndexA, AbstractTruffleString b, int fromByteIndexB, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RegionEqualByteIndexNode
.- Since:
- 22.1
-
regionEqualByteIndexUncached
public final boolean regionEqualByteIndexUncached(int fromByteIndexA, TruffleString.WithMask b, int fromByteIndexB, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.RegionEqualByteIndexNode
.- Since:
- 22.1
-
concatUncached
public final TruffleString concatUncached(AbstractTruffleString b, TruffleString.Encoding expectedEncoding, boolean lazy) Shorthand for calling the uncached version ofTruffleString.ConcatNode
.- Since:
- 22.1
-
repeatUncached
Shorthand for calling the uncached version ofTruffleString.RepeatNode
.- Since:
- 22.1
-
substringUncached
public final TruffleString substringUncached(int fromIndex, int substringLength, TruffleString.Encoding expectedEncoding, boolean lazy) Shorthand for calling the uncached version ofTruffleString.SubstringNode
.- Since:
- 22.1
-
substringByteIndexUncached
public final TruffleString substringByteIndexUncached(int fromByteIndex, int byteLength, TruffleString.Encoding expectedEncoding, boolean lazy) Shorthand for calling the uncached version ofTruffleString.SubstringByteIndexNode
.- Since:
- 22.1
-
equalsUncached
public final boolean equalsUncached(AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.EqualNode
.- Since:
- 22.1
-
parseIntUncached
Shorthand for calling the uncached version ofTruffleString.ParseIntNode
.- Throws:
TruffleString.NumberFormatException
- Since:
- 22.1
-
parseIntUncached
Shorthand for calling the uncached version ofTruffleString.ParseIntNode
.- Throws:
TruffleString.NumberFormatException
- Since:
- 22.1
-
parseLongUncached
Shorthand for calling the uncached version ofTruffleString.ParseLongNode
.- Throws:
TruffleString.NumberFormatException
- Since:
- 22.1
-
parseLongUncached
Shorthand for calling the uncached version ofTruffleString.ParseLongNode
.- Throws:
TruffleString.NumberFormatException
- Since:
- 22.1
-
parseDoubleUncached
Shorthand for calling the uncached version ofTruffleString.ParseDoubleNode
.- Throws:
TruffleString.NumberFormatException
- Since:
- 22.1
-
getInternalByteArrayUncached
public final InternalByteArray getInternalByteArrayUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.GetInternalByteArrayNode
.- Since:
- 22.1
-
getInternalNativePointerUncached
Shorthand for calling the uncached version ofTruffleString.GetInternalNativePointerNode
.- Since:
- 22.1
-
copyToByteArrayUncached
Shorthand for calling the uncached version ofTruffleString.CopyToByteArrayNode
.- Since:
- 22.3
-
copyToByteArrayNodeUncached
@Deprecated(since="22.3") public final void copyToByteArrayNodeUncached(int byteFromIndexA, byte[] dst, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Deprecated.since 22.3, usecopyToByteArrayUncached(int, byte[], int, int, Encoding)
instead.Shorthand for calling the uncached version ofTruffleString.CopyToByteArrayNode
.- Since:
- 22.1
-
copyToByteArrayUncached
public final void copyToByteArrayUncached(int byteFromIndexA, byte[] dst, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CopyToByteArrayNode
.- Since:
- 22.1
-
copyToNativeMemoryNodeUncached
@Deprecated(since="22.3") public final void copyToNativeMemoryNodeUncached(int byteFromIndexA, Object pointerObject, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Deprecated.since 22.3, usecopyToNativeMemoryUncached(int, Object, int, int, Encoding)
instead.Shorthand for calling the uncached version ofTruffleString.CopyToNativeMemoryNode
.- Since:
- 22.1
-
copyToNativeMemoryUncached
public final void copyToNativeMemoryUncached(int byteFromIndexA, Object pointerObject, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CopyToNativeMemoryNode
.- Since:
- 22.1
-
toValidStringUncached
Shorthand for calling the uncached version ofTruffleString.ToValidStringNode
.- Since:
- 23.1
-
toJavaStringUncached
Shorthand for calling the uncached version ofTruffleString.ToJavaStringNode
.- Since:
- 22.1
-
switchEncodingUncached
Shorthand for calling the uncached version ofTruffleString.SwitchEncodingNode
.- Since:
- 22.1
-
switchEncodingUncached
public final TruffleString switchEncodingUncached(TruffleString.Encoding targetEncoding, TranscodingErrorHandler errorHandler) Shorthand for calling the uncached version ofTruffleString.SwitchEncodingNode
.- Since:
- 23.1
-
forceEncodingUncached
public final TruffleString forceEncodingUncached(TruffleString.Encoding expectedEncoding, TruffleString.Encoding targetEncoding) Shorthand for calling the uncached version ofTruffleString.ForceEncodingNode
.- Since:
- 22.1
-
createCodePointIteratorUncached
public final TruffleStringIterator createCodePointIteratorUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CreateCodePointIteratorNode
.- Since:
- 22.1
-
createBackwardCodePointIteratorUncached
public final TruffleStringIterator createBackwardCodePointIteratorUncached(TruffleString.Encoding expectedEncoding) Shorthand for calling the uncached version ofTruffleString.CreateBackwardCodePointIteratorNode
.- Since:
- 22.1
-
equals
Returnstrue
if this string is equal toobj
.TruffleString
does not attempt to automatically convert differently encoded strings during comparison, make sure to convert both strings to a common encoding before comparing them! -
hashCode
public final int hashCode()Returns this string's hashcode. Note that the hashcode is dependent on the string's encoding, make sure to convert strings to a common encoding before comparing their hash codes! -
toString
Returns aString
representation of this string. Do not use this on fast paths. -
toStringDebug
Returns debug information about this string. For debugging purposes only. The format of the information returned by this method is unspecified and may change at any time.- Since:
- 22.1
-
copyToByteArrayUncached(int, byte[], int, int, Encoding)
instead.