blob: c01b0d16d89c34701b876064c1dc1db39dba0843 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/// src/sv.h --- simple String View library
//
// Copyright (C) 2026 by Martin Michalec <martin@michalec.dev>
//
// SPDX-License-Identifier: MIT
//
/// Commentary:
//
/// Code:
#ifndef INCLUDED_SV_H
#define INCLUDED_SV_H
#define SV_LENGTH(SV) ((SV).end - (SV).beg)
#define SV_FMT "%.*s"
#define SV_FMTA(SV) (int) SV_LENGTH (SV), (SV).beg
struct sv {
const char *beg;
const char *end;
};
#endif // INCLUDED_SV_H
/// src/sv.h ends here
|