diff options
Diffstat (limited to 'libs/kstd/src/cstring.cpp')
| -rw-r--r-- | libs/kstd/src/cstring.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/kstd/src/cstring.cpp b/libs/kstd/src/cstring.cpp new file mode 100644 index 0000000..5419b7d --- /dev/null +++ b/libs/kstd/src/cstring.cpp @@ -0,0 +1,10 @@ +#include <algorithm> +#include <cstddef> + +extern "C" +{ + auto strlen(const char * string) -> std::size_t + { + return std::distance(string, std::ranges::find(string, nullptr, '\0')); + } +} |
