The builtin type byteString.
A byteString is a sequence of bytes (octets) with any value from 0 to
255. A byteString cannot be modified, see varByteString for a mutable
byteString.
The C implementation uses a sequence of bytes. Conversion to and from
string does not involve changes.
The Javascript implementation uses a sequence of characters. Conversion
to and from string involves using the characters as utf-8 bytes and
requires work.
|
$Size()
int @public | Return the number of bytes in the byteString.
|
|
$ToString()
string @public | Convert the byteString to a string.
|
|
$ToString(format)
string @public | Convert the byteString to a string and then apply format.
|
|
$latin1ToString()
string @public | Assuming that the byteString contains Latin1 characters, return a string
encoded in utf-8.
|
|
$asByteString()
byteString @public | Returns itself.
|
|
$toByteString()
byteString @public | Returns itself.
|
|
$Compare(other)
int @public | Return -1, 0 or 1 when other is larger, equal to or smaller than this
byteString.
|
|
$Equal(other)
bool @public | Return TRUE when other is equal to this byteString, FALSE otherwise.
|
|
$asString()
string @public | Return the byteString as a string.
|
|
$toVarString()
varString @public | Convert the byteString to a varString. Equivalent to
|
|
$toVarByteString()
varByteString @public | Convert the byteString to a varByteString.
|
|
$get(idx)
int @public | Return the byte at position idx.
|
|
$getByte(idx)
int @public | Return the byte at position idx.
|
|
$getChar(idx)
int @public | Return the UTF-8 encoded character at position idx.
|
|
$getCharSize(idx)
int @public | Return the byte size of the UTF-8 encoded character at position idx.
|
|
$find(b)
int @public | Return the lowest index where byteString b appears.
|
|
$find(b)
int @public | Return the lowest index where byte b appears.
|
|
$findLast(b)
int @public | Return the highest index where byteString b appears.
|
|
$findLast(b)
int @public | Return the highest index where byte b appears.
|
|
$startsWith(b)
bool @public | Return TRUE when the byteString starts with b.
|
|
$endsWith(b)
bool @public | Return TRUE when the byteString ends with b.
|
|
$hash()
int @public | Return a number that is a hash value of the byteString.
|
|
$slice(start)
byteString @public | Return a copy of the byteString, starting at index start.
|
|
$slice(start, end)
byteString @public | Return a copy of the byteString, starting at index start and ending at
end, inclusive.
|
|
$sliceSize(start, length)
byteString @public | Return a copy of the byteString, starting at index start with up to
length bytes.
|
|
$sliceWrap(start)
byteString @public | Return a copy of the byteString, starting at index start.
|
|
$sliceWrap(start, end)
byteString @public | Return a copy of the byteString, starting at index start and ending at
end, inclusive.
|
|
$sliceWrapSize(start, length)
byteString @public | Return a copy of the byteString, starting at index start with up to
length bytes.
|
|
$split()
list<byteString> @public | Return a list with the byteString split into pieces, split at white space.
|
|
$split(sep)
list<byteString> @public | Return a list with the byteString split into pieces, split at sep.
|
|
|