O2S C Library 1.8.2
Provide high-level data-structures and other fundamental tools for C projects
Loading...
Searching...
No Matches
string_input_stream.h
Go to the documentation of this file.
1#pragma once
2
3/* ************************************************************************** */
4/* ____ _ _____ ____ _ _ _ _____ _ _ ____ ____ */
5/* / ___| / \ | ___| _ \ / \ | \ | | |_ _| || | | _ \/ ___| */
6/* \___ \ / _ \ | |_ | |_) | / _ \ | \| | | | | || |_| | | \___ \ */
7/* ___) / ___ \| _| | _ < / ___ \| |\ | | | |__ _| |_| |___) | */
8/* |____/_/ \_|_| |_| \_/_/ \_|_| \_| |_| |_| |____/|____/ */
9/* */
16/* ************************************************************************** */
17
18#include "o2s/input_stream.h"
19#include "o2s/string.h"
20
21#include <stddef.h> // size_t
22
24istream_t cstring_input_stream(const char* value, size_t length);
25
30#define string_literal_input_stream(Value) \
31 cstring_input_stream(Value, strlen(Value))
32
49#define StringInputStream __attribute__((cleanup(istream_close))) istream_t
Buffered input streams.
Dynamic string implementation.
array_t string_t
A string is an array of char.
Definition string.h:30
istream_t cstring_input_stream(const char *value, size_t length)
Create an input stream with the content of a C string.
Definition string.c:25
istream_t string_input_stream(const string_t *value)
Create an input stream with the content of a string.
Definition string.c:19
Input Stream.