summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-07-14 10:25:56 +0200
committerTom Smeding <tom@tomsmeding.com>2024-07-14 10:25:56 +0200
commit1168c8ab426105bcd1b65aaf1f62c7a6144b0ae8 (patch)
treedd7d13be9988d234d9b3284b4bc88a9dd7f74d46 /src/util
parent723828d1d473b70f77fa7878f855c2956ddcacc4 (diff)
file_lines module, herschrijf omd ermee
Diffstat (limited to 'src/util')
-rw-r--r--src/util/string_view.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/string_view.h b/src/util/string_view.h
new file mode 100644
index 0000000..82f7b0c
--- /dev/null
+++ b/src/util/string_view.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include <stddef.h>
+
+
+// A non-owned view on a (sub)string.
+struct string_view {
+ char *s;
+ size_t len;
+};