aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/src/libc/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/kstd/src/libc/string.cpp')
-rw-r--r--libs/kstd/src/libc/string.cpp15
1 files changed, 15 insertions, 0 deletions
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 <algorithm>
+#include <cstddef>
+
+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