added:
* file: small wrap over winapi for windows and stdio for posix * fs: small wrapper over stat * slice: slice macro type modified: * str and strview are now slices
This commit is contained in:
parent
bb5cce33f0
commit
c4d1ffe539
15 changed files with 451 additions and 88 deletions
12
strview.h
12
strview.h
|
|
@ -9,12 +9,16 @@ extern "C" {
|
|||
#include <stddef.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "slice.h"
|
||||
|
||||
#define STRV_NOT_FOUND SIZE_MAX
|
||||
|
||||
typedef struct {
|
||||
const char *buf;
|
||||
size_t size;
|
||||
} strview_t;
|
||||
// typedef struct {
|
||||
// const char *buf;
|
||||
// size_t size;
|
||||
// } strview_t;
|
||||
|
||||
typedef slice_t(const char *) strview_t;
|
||||
|
||||
strview_t strvInit(const char *cstr);
|
||||
strview_t strvInitLen(const char *buf, size_t size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue