aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/src/libc/string.cpp
blob: c6b3847c6694764841b2ab49c8382afd3ddcb73b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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