This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
api:buffer [2016/06/19 05:54] payonel [Interface Methods] |
api:buffer [2016/06/19 05:58] payonel [Instance Methods] |
||
---|---|---|---|
Line 62: | Line 62: | ||
| | ||
Each `format` is read from the stream and all returned in a multiple return value list of the results. Note all format strings are prefixed with \* and also note that only the first char of the string names of the formats matters, the rest is ignored. These are the supported formats: | Each `format` is read from the stream and all returned in a multiple return value list of the results. Note all format strings are prefixed with \* and also note that only the first char of the string names of the formats matters, the rest is ignored. These are the supported formats: | ||
- | ``` | ||
- | local file = io.open( | ||
- | ``` | ||
- | * a number value, e.g. `b:read(10)` | + | * a number value, e.g. `10` |
Read **n** chars from the stream, result is a string. | Read **n** chars from the stream, result is a string. |