y
03/01/2024, 9:05 PMO(1)
time?)
or is String
a compiler builtin?ephemient
03/01/2024, 9:07 PMString
is a wrapper around an immutable CharArray
ephemient
03/01/2024, 9:09 PMjava.lang.String
at runtime, which has an internal byte[]
representation, plus a bit to configure whether it's ISO-8859-1 or UTF-16 encoded)ephemient
03/01/2024, 9:10 PMByteArray
it needs to make a copy either wayephemient
03/01/2024, 9:11 PMChar
is a UTF-16 code unit. it is neither a byte nor a Unicode charactery
03/01/2024, 9:12 PMephemient
03/01/2024, 9:12 PMy
03/01/2024, 9:13 PMy
03/01/2024, 9:14 PMephemient
03/01/2024, 9:31 PMString
doesn't validate that UTF-16 surrogates are properly paired either. in case it's not legal Unicode, a string may not be encodable to UTF-8 bytes