55
edits
| Line 161: | Line 161: | ||
In addition to the methods and properties defined for the '''TextStream''' class, ByteBuffers implement the following methods: | In addition to the methods and properties defined for the '''TextStream''' class, ByteBuffers implement the following methods: | ||
;append(s String, [begin Number], [end Number]) | ;append(s String, [begin Number], [end Number]) StringBuffer | ||
:Append s or, if begin and end are specified, a substring of s to the end of the buffer, increasing its length by the number of appended characters. This is equal to setting the stream's position to the value of its length property and then calling write(s). | :Append s or, if begin and end are specified, a substring of s to the end of the buffer, increasing its length by the number of appended characters. This is equal to setting the stream's position to the value of its length property and then calling write(s). This methods returns the buffer it was invoked on. | ||
;insert(pos Number, s String, [begin Number], [end Number]) | ;insert(pos Number, s String, [begin Number], [end Number]) StringBuffer | ||
:Insert s or, if begin and end are specified, a substring of s at the given position, moving any characters above that position and increasing the buffer's length by the length of the inserted string. | :Insert s or, if begin and end are specified, a substring of s at the given position, moving any characters above that position and increasing the buffer's length by the length of the inserted string. This methods returns the buffer it was invoked on. | ||
;remove(begin Number, end Number) StringBuffer | |||
:Remove a range of characters from the buffer, moving down any characters above the range and decreasing the buffer's length by the number of removed bytes. This methods returns the buffer it was invoked on. | |||
;toString() String | ;toString() String | ||
edits