Sprout/sprout/cstring/strlen.hpp

18 lines
365 B
C++
Raw Normal View History

2012-04-01 13:15:09 +00:00
#ifndef SPROUT_CSTRING_STRLEN_HPP
#define SPROUT_CSTRING_STRLEN_HPP
#include <cstddef>
#include <sprout/config.hpp>
namespace sprout {
// 7.21.6.3 strlen <20>֐<EFBFBD>
2012-10-05 15:58:56 +00:00
inline SPROUT_CONSTEXPR std::size_t
strlen(char const* s) {
return !*s ? 0
: 1 + sprout::strlen(s + 1)
;
2012-04-01 13:15:09 +00:00
}
} // namespace sprout
#endif // #ifndef SPROUT_CSTRING_STRLEN_HPP