-
Notifications
You must be signed in to change notification settings - Fork 1
serializer.string stream
load serializer.string-stream
This module provides the Serializer.StringStream class which allow to use a string object as a stream.
This class provides an interface to use an instance of string as a stream.
| Modifiers | Member | Description |
|---|---|---|
const |
<< | Writes the string data to the stream, and returns a reference to the stream. |
const |
>> | Reads the remaining data from the stream and stores it in data, then returns ... |
const |
isEmpty | Returns true if the current edited string has no more data to read; otherwise... |
const |
new | Creates a new stream on the str object. If the object is an instance of strin... |
const |
read | Returns all remaining data from the string as an instance of Serializer.Strin... |
const |
readSome | Returns at most count bytes from the string as an instance of Serializer.Stri... |
const |
toString | Returns the whole edited string. |
const |
write | Appends data to the end of the string. The data parameter should be an instan... |
| Modifiers | Member | Description |
|---|---|---|
final |
bytePos | Internal read byte buffer offset. |
final |
charBuffer | Internal read char buffer. |
@ const
|
g_lib | Global library handle |
def (self, data)
Writes the string data to the stream, and returns a reference to the stream.
def (self, data)
Reads the remaining data from the stream and stores it in data, then returns a reference to the stream.
0
Internal read byte buffer offset.
null
Internal read char buffer.
lib ('libmint-serializer')
Global library handle
def (const self)
Returns true if the current edited string has no more data to read;
otherwise returns false.
def (self, str)
Creates a new stream on the str object. If the object is an instance
of string, it will be directly used to be updated on write operations;
otherwise the object is cast to string using the toString method. The
written data can then only be retrieved by read operations.
def (self)
Returns all remaining data from the string as an instance of Serializer.DataStream.
def (self, count)
Returns at most count bytes from the string as an instance of Serializer.DataStream.
def (const self)
Returns the whole edited string.
def (self, data)
Appends data to the end of the string. The data parameter should be an instance of Serializer.DataStream
encoding the string as an UTF-8 sequence of bytes.
- Introduction
- Variables
-
Built-in-types
- Built-in-types#none
- Built-in-types#null
- Built-in-types#boolean
- Built-in-types#number
- Built-in-types#string
- Built-in-types#regex
- Built-in-types#array
- Built-in-types#hash
- Built-in-types#iterator
- Built-in-types#async_iterator
- Built-in-types#package
- Built-in-types#function
- Built-in-types#coroutine
- Built-in-types#library
- Built-in-types#libobject
- Arithmetic-operations
- Type-casting
- Control-structures
- Function-definition
- User-defined-types
- Work-with-modules