Tchatator413
TripEnArvor instant messaging protocol - JSON-based
Loading...
Searching...
No Matches
lib
tchatator413
slice.h
Go to the documentation of this file.
1
5
6
#ifndef SLICE_H
7
#define SLICE_H
8
9
#include <stdlib.h>
10
12
typedef
struct
{
13
size_t
len;
15
char
const
*
val
;
16
}
slice_t
;
17
18
#define SLICE_CONST(STRLIT) \
19
(slice_t) { .len = sizeof STRLIT - 1, .val = STRLIT }
20
24
int
slice_leni
(
slice_t
slice);
25
26
#endif
// SLICE_H
slice_leni
int slice_leni(slice_t slice)
Returns the length of a slice as a signed integer.
slice_t
A memory slice.
Definition
slice.h:12
slice_t::val
char const * val
Definition
slice.h:15
Generated on Mon Mar 10 2025 13:17:37 for Tchatator413 by
1.9.8