From acabbacdee68ad80e829bda56ae5363d04646d2d Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 29 Oct 2025 10:39:30 +0100 Subject: kstd: clean up libc implementation --- libs/kstd/src/libc/string.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libs/kstd/src/libc/string.cpp (limited to 'libs/kstd/src/libc/string.cpp') diff --git a/libs/kstd/src/libc/string.cpp b/libs/kstd/src/libc/string.cpp new file mode 100644 index 0000000..c6b3847 --- /dev/null +++ b/libs/kstd/src/libc/string.cpp @@ -0,0 +1,15 @@ +#include +#include + +namespace kstd::libc +{ + + extern "C" + { + auto strlen(const char * string) -> std::size_t + { + return std::distance(string, std::ranges::find(string, nullptr, '\0')); + } + } + +} // namespace kstd::libc \ No newline at end of file -- cgit v1.2.3