diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-04-13 23:47:20 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-04-13 23:47:20 -0700 |
commit | 2200c689814c2aa7c2a90c68d24d15de141b6280 (patch) | |
tree | c093fa1051a1924fe04f7aff468c9a5c2ee6409b /subx | |
parent | 0b91d25cf591888252d5e99e7986e2544de31695 (diff) | |
download | mu-2200c689814c2aa7c2a90c68d24d15de141b6280.tar.gz |
5091
Diffstat (limited to 'subx')
-rw-r--r-- | subx/Readme.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/subx/Readme.md b/subx/Readme.md index cc5d7b07..66449ead 100644 --- a/subx/Readme.md +++ b/subx/Readme.md @@ -619,9 +619,12 @@ allocated memory for it.)_ - Will silently stop reading when destination runs out of space. * `read-byte`: buffered-file -> byte * `read-line`: buffered-file -> stream + - Will abort the entire program if there isn't enough room. #### non-IO operations on streams -* `new-stream`: allocates space for a stream of size `n`. +* `new-stream`: allocates space for a stream of `n` elements, each occupying + `b` bytes. + - Will abort the entire program if `n*b` requires more than 32 bits. * `clear-stream`: resets everything in the stream to `0` (except its `length`). * `rewind-stream`: resets the read index of the stream to `0` without modifying its contents. @@ -645,8 +648,8 @@ from a stream: from a slice: * `next-token-from-slice`: start, end, delimiter byte -> slice - Given a slice and a delimiter byte, returns a new slice inside the input - that ends at the delimiter byte. + - Given a slice and a delimiter byte, returns a new slice inside the input + that ends at the delimiter byte. * `skip-chars-matching-in-slice`: curr, end, delimiter byte -> new-curr (in `EAX`) * `skip-chars-not-matching-in-slice`: curr, end, delimiter byte -> new-curr (in `EAX`) |