ServerJS/Binary/B: Difference between revisions

Jump to navigation Jump to search
Formatting and explication of byteAt, charAt, and their types.
(remove + operator and valueOf (the first not being implementable and the second being ununderstood))
(Formatting and explication of byteAt, charAt, and their types.)
Line 70: Line 70:
; lastIndexOf(byte, start, stop)
; lastIndexOf(byte, start, stop)
: Returns the index of the last occurance of byte (a Number or a single element ByteString or ByteArray) or -1 if none was found. If start and/or stop are specified, only elements between the the indexes start and stop are searched.
: Returns the index of the last occurance of byte (a Number or a single element ByteString or ByteArray) or -1 if none was found. If start and/or stop are specified, only elements between the the indexes start and stop are searched.
; byteAt(offset)
; charCodeAt(offset)
; charCodeAt(offset)
: Return the byte at offset as a Number.
: Return the byte at offset as a Number.
; charAt(offset)
; byteAt(offset) ByteString
; charAt(offset) ByteString
: Return the byte at offset as a ByteString.
: Return the byte at offset as a ByteString.
; split(delimiter, [options])
; split(delimiter, [options])
Line 88: Line 88:


; substr(start)
; substr(start)
:
; substr(start, length)
; substr(start, length)
:
; substring(first)
; substring(first)
:
; substring(first, last)
; substring(first, last)
; The immutable [] operator returning ByteStrings
 
; toSource() which would return "ByteString([])" for a null byte string
; [] ByteString
: the immutable [] operator returning ByteStrings
; toSource()
: which would return "ByteString([])" for a null byte string


ByteString does not implement toUpperCase() or toLowerCase() since they are not meaningful without the context of a charset.
ByteString does not implement toUpperCase() or toLowerCase() since they are not meaningful without the context of a charset.
Line 144: Line 150:
; toByteString(sourceCharset, targetCharset)
; toByteString(sourceCharset, targetCharset)
: transcoded
: transcoded
; <u>byteAt(offset)</u>
; <u>byteAt(offset) ByteString</u>
; <u>charAt(offset) ByteString</u>
:
; concat(other:ByteArray|ByteString|Array)
; concat(other:ByteArray|ByteString|Array)
; pop() -> byte:Number
; pop() byte:Number
; push(...variadic Numbers...)-> count:Number
:
; shift() -> byte:Number
; push(...variadic Numbers...) count:Number
; unshift(...variadic Numbers...) -> count:Number
:
; shift() byte:Number
:
; unshift(...variadic Numbers...) count:Number
:
; reverse() in place reversal
; reverse() in place reversal
:
; slice()
; slice()
:
; sort()
; sort()
:
; splice()
; splice()
; toSource() returns a string like "ByteArray([])" for a null byte-array.
:
; The mutable [] operator for numbers
; toSource()
: returns a string like "ByteArray([])" for a null byte-array.
; [] Number
: The mutable [] operator for numbers


== String ==
== String ==
171

edits

Navigation menu