Returns a segment of the bytes. Requires an integer parameter as the position from which the segment begins. An optional second integer parameter defines the length of the bytes segment to return. The returned object contains the segment from the starting position and continues until the end of the bytes sequence, or up to the specified length of the bytes segment.
Bytes Object->sub(Integer) Bytes Object->sub(Integer,Integer)
Use the [bytes->sub] method. The following example returns a bytes segment starting from position 6 until the end of the bytes sequence.
local(b = bytes('rhinoceros')) #b->sub(6)
Use the [bytes->sub] method. The following example returns a bytes segment starting from position 6 of length 4.
local(b = bytes('rhinoceros')) #b->sub(6,4)
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft