mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:45:10 +00:00
19 lines
353 B
C
19 lines
353 B
C
#include <StringStream.h>
|
|
|
|
#include <Cytoplasm/Memory.h>
|
|
#include <Cytoplasm/Stream.h>
|
|
#include <Cytoplasm/Str.h>
|
|
#include <Cytoplasm/Io.h>
|
|
|
|
#include <string.h>
|
|
|
|
Stream *
|
|
StrStreamReaderN(char *buffer, int n)
|
|
{
|
|
if (!buffer || n < 0)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
return StreamFile(fmemopen(buffer, n ? (size_t) n : strlen(buffer), "rb"));
|
|
}
|