iostream.blob.tell
Returns the current stream position
Return value
See iostream.stream.tell for the generic contract.
Notes
This is the same cursor that seek, readn, writen, readblob and writeblob move; indexing a blob with [] does not move it.
Example
from "iostream" import blob
let b = blob(4)
println("b.tell() at start =", b.tell())
b.readn('i')
println("b.tell() after readn('i') =", b.tell()) // readn advanced the cursor by 4 bytes
b[0] // indexing reads a byte but never moves the cursor
println("b.tell() after b[0] =", b.tell())Output:
b.tell() at start = 0
b.tell() after readn('i') = 4
b.tell() after b[0] = 4See also
tell | Returns the current stream position |
seek | Seeks to the given offset; origin is 'b' (begin), 'c' (current) or 'e' (end) |
len | Returns the stream length |
| blob | class index |