public abstract static class TruffleString.SwitchEncodingNode extends Node
TruffleString.SwitchEncodingNode.execute(AbstractTruffleString, TruffleString.Encoding)for details.
|Modifier and Type||Method and Description|
Create a new
Returns a version of string
Get the uncached version of
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 TruffleString execute(AbstractTruffleString a, TruffleString.Encoding encoding)
athat is encoded in the given encoding, which may be the string itself or a converted version. Note that the string itself may be returned even if it was originally created using a different encoding, if the string is byte-equivalent in both encodings.
If no lossless conversion is possible, the string is converted on a best-effort basis; no
exception is thrown and characters which cannot be mapped in the target encoding are
'�' (for UTF-*) or
public static TruffleString.SwitchEncodingNode create()