0
|
1 libbuf |
|
2 ====== |
|
3 |
|
4 Minimalist dynamic string library for C99. |
|
5 |
|
6 Documentation |
|
7 ------------- |
|
8 |
|
9 You can generate the documentation using `make doxygen`, otherwise you can also |
|
10 read the *libbuf.3* manual page. |
|
11 |
|
12 Portability |
|
13 ----------- |
|
14 |
|
15 The code itself is compatible with any compiler that provides C99 support at |
|
16 least but should also support the POSIX `ENOMEM` constant. If not present on |
|
17 your system you should never check global `errno` value while using this |
|
18 function. |
|
19 |
|
20 It was tested on: |
|
21 |
|
22 - MinGW-w64, |
|
23 - Visual Studio 2019, |
|
24 - macOS Catalina (10.15.7), |
|
25 - Linux (musl, glibc), |
|
26 - FreeBSD, |
|
27 - OpenBSD, |
|
28 - NetBSD. |
|
29 |
7
|
30 API compatibility |
|
31 ----------------- |
|
32 |
|
33 The library follows strictly [semantic versioning][semver]. |
|
34 |
0
|
35 FAQ |
|
36 --- |
|
37 |
|
38 ### Why another library? |
|
39 |
|
40 Sure there are a lot of string management libraries out there but I wanted a |
|
41 very minimal one that does not include fancy things like trim, split, tokenizer |
|
42 and such. This library only exposes 13 functions to the user which should be |
|
43 enough. |
|
44 |
|
45 At the time of writing it's also less than 350 lines of code. |
|
46 |
|
47 Also, I wanted a library easy to embed everywhere without a complicated build |
|
48 process. This library can be bundled in your project by just copying all .c |
|
49 files and .h files without any modification. |
|
50 |
|
51 ### Why every function is defined in its own file? |
|
52 |
|
53 Because it improves static linking as only symbols you need are bundled into |
|
54 your final executable. |
|
55 |
5
|
56 ### Why not using `open_memstream`? |
|
57 |
|
58 It's a POSIX function that is not available on every operating system, but if |
|
59 you don't care about portability you can obviously stick with it. |
|
60 |
0
|
61 Author |
|
62 ------ |
|
63 |
|
64 David Demelier <markand@malikania.fr> |
7
|
65 |
|
66 [semver]: https://semver.org |