#include "koliseo.h"
#include "ctype.h"
Go to the source code of this file.
|
Kstr | kstr_new (const char *str, size_t len) |
Kstr | kstr_from_c_lit (const char *c_lit) |
bool | kstr_eq (Kstr left, Kstr right) |
bool | kstr_eq_ignorecase (Kstr left, Kstr right) |
Kstr | kstr_cut_l (Kstr *k, size_t n) |
Kstr | kstr_cut_r (Kstr *k, size_t n) |
Kstr | kstr_trim_left (Kstr kstr) |
Kstr | kstr_trim_right (Kstr kstr) |
Kstr | kstr_trim (Kstr kstr) |
bool | kstr_indexof (Kstr k, char c, int *idx) |
Kstr | kstr_token (Kstr *k, char delim) |
bool | kstr_try_token (Kstr *k, char delim, Kstr *part) |
Kstr | kstr_token_kstr (Kstr *k, Kstr delim) |
const char * | string_from_Gulp_Res (Gulp_Res g) |
char * | kls_gulp_file_sized (Koliseo *kls, const char *filepath, Gulp_Res *err, size_t max_size) |
char * | try_kls_gulp_file (Koliseo *kls, const char *filepath, size_t max_size) |
Kstr * | kls_gulp_file_sized_to_kstr (Koliseo *kls, const char *filepath, Gulp_Res *err, size_t max_size, bool allow_nullchar) |
Kstr * | try_kls_gulp_file_to_kstr (Koliseo *kls, const char *filepath, size_t max_size, bool allow_nullchar) |
◆ GULP_MAX_FILE_SIZE
◆ Gulp_Res_Arg
#define Gulp_Res_Arg |
( |
| gr | ) |
|
Value:
const char * string_from_Gulp_Res(Gulp_Res g)
Format matching macro for a Gulp_Res.
◆ Gulp_Res_Fmt
#define Gulp_Res_Fmt "%s" |
◆ KLS_GULP_FILE
#define KLS_GULP_FILE |
( |
| kls, |
|
|
| filepath ) |
Value:
#define GULP_MAX_FILE_SIZE
Defines max size allowed for a file passed to KLS_GULP_FILE().
Definition kls_gulp.h:71
char * try_kls_gulp_file(Koliseo *kls, const char *filepath, size_t max_size)
◆ KLS_GULP_FILE_KSTR
#define KLS_GULP_FILE_KSTR |
( |
| kls, |
|
|
| filepath ) |
Value:
Kstr * try_kls_gulp_file_to_kstr(Koliseo *kls, const char *filepath, size_t max_size, bool allow_nullchar)
◆ KSTR
Value:
Kstr kstr_new(const char *str, size_t len)
◆ Kstr_Arg
Value:(int) (kstr.len), (kstr.data)
Format matching macro for a Kstr.
◆ Kstr_Fmt
◆ KSTR_NULL
◆ ONEGB_DEC_INT
#define ONEGB_DEC_INT 1073741824 |
◆ Gulp_Res
◆ Kstr
◆ Gulp_Res
Defines possible results for kls_gulp_file_sized().
- See also
- kls_gulp_file_sized().
Enumerator |
---|
GULP_FILE_OK | |
GULP_FILE_NOT_EXIST | |
GULP_FILE_TOO_LARGE | |
GULP_FILE_READ_ERROR | |
GULP_FILE_CONTAINS_NULLCHAR | |
GULP_FILE_KLS_NULL | |
TOT_GULP_RES | |
◆ kls_gulp_file_sized()
char * kls_gulp_file_sized |
( |
Koliseo * | kls, |
|
|
const char * | filepath, |
|
|
Gulp_Res * | err, |
|
|
size_t | max_size ) |
◆ kls_gulp_file_sized_to_kstr()
Kstr * kls_gulp_file_sized_to_kstr |
( |
Koliseo * | kls, |
|
|
const char * | filepath, |
|
|
Gulp_Res * | err, |
|
|
size_t | max_size, |
|
|
bool | allow_nullchar ) |
◆ kstr_cut_l()
◆ kstr_cut_r()
◆ kstr_eq()
◆ kstr_eq_ignorecase()
bool kstr_eq_ignorecase |
( |
Kstr | left, |
|
|
Kstr | right ) |
◆ kstr_from_c_lit()
Kstr kstr_from_c_lit |
( |
const char * | c_lit | ) |
|
◆ kstr_indexof()
bool kstr_indexof |
( |
Kstr | k, |
|
|
char | c, |
|
|
int * | idx ) |
◆ kstr_new()
Kstr kstr_new |
( |
const char * | str, |
|
|
size_t | len ) |
◆ kstr_token()
Kstr kstr_token |
( |
Kstr * | k, |
|
|
char | delim ) |
◆ kstr_token_kstr()
◆ kstr_trim()
◆ kstr_trim_left()
◆ kstr_trim_right()
◆ kstr_try_token()
bool kstr_try_token |
( |
Kstr * | k, |
|
|
char | delim, |
|
|
Kstr * | part ) |
◆ string_from_Gulp_Res()
const char * string_from_Gulp_Res |
( |
Gulp_Res | g | ) |
|
◆ try_kls_gulp_file()
char * try_kls_gulp_file |
( |
Koliseo * | kls, |
|
|
const char * | filepath, |
|
|
size_t | max_size ) |
◆ try_kls_gulp_file_to_kstr()
Kstr * try_kls_gulp_file_to_kstr |
( |
Koliseo * | kls, |
|
|
const char * | filepath, |
|
|
size_t | max_size, |
|
|
bool | allow_nullchar ) |
◆ gulp_res_names