Class TextStream
- class ooodev.utils.string.text_stream.TextStream[source]
Class for Text Stream.
- static get_str_list_from_text_input_stream(txt_stream, sep, close_stream=True)[source]
Gets a StrList from a TextInputStreamComp.
- Parameters:
txt_stream (TextInputStreamComp) – TextInputStreamComp to convert.
sep (str) – Separator.
close_stream (bool, optional) – Close the stream after reading. Defaults to
True
.
- Returns:
StrList.
- Return type:
- static get_text_input_stream_from_bytes(*byte)[source]
Gets a text input stream from bytes.
- Parameters:
byte (int) – One or more Bytes to convert.
- Returns:
Text input stream.
- Return type:
- static get_text_input_stream_from_str(text, encoding='UTF-8')[source]
Gets a text input stream from bytes.
- Parameters:
strings (StrList) – One or more Bytes to convert.
encoding (str, optional) – Encoding for the strings. Defaults to
UTF-8
.text (str) –
- Returns:
Text input stream.
- Return type: