diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-30 13:36:18 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-30 13:36:18 +0100 |
commit | 57f4e225d10c73bbefa276f01d37b13c4138e245 (patch) | |
tree | 0d357140507e311c63b7dae8ce62864a6629b3e7 /lib/strlen.h | |
parent | Reformat with new clang-format 16 (diff) | |
download | ilt-57f4e225d10c73bbefa276f01d37b13c4138e245.tar.bz2 ilt-57f4e225d10c73bbefa276f01d37b13c4138e245.tar.xz ilt-57f4e225d10c73bbefa276f01d37b13c4138e245.zip |
Rename strings.h to something that won't conflict with a system header
Diffstat (limited to 'lib/strlen.h')
-rw-r--r-- | lib/strlen.h | 14 |
1 files changed, 14 insertions, 0 deletions
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 <GL/glew.h> +#include <cstddef> + +constexpr auto +constexpr_strlen(const GLchar * const s) +{ + std::size_t ch {}; + while (s[ch]) { + ch++; + } + return ch; +} |