From 57f4e225d10c73bbefa276f01d37b13c4138e245 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 30 Apr 2023 13:36:18 +0100 Subject: Rename strings.h to something that won't conflict with a system header --- lib/strlen.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/strlen.h (limited to 'lib/strlen.h') diff --git a/lib/strlen.h b/lib/strlen.h new file mode 100644 index 0000000..0053cce --- /dev/null +++ b/lib/strlen.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +constexpr auto +constexpr_strlen(const GLchar * const s) +{ + std::size_t ch {}; + while (s[ch]) { + ch++; + } + return ch; +} -- cgit v1.2.3