xieite ::str_size ()
Defined in fragment xieite :str_size
(header-only:
<xieite/str/str_size.hpp>
)
A
constexpr
wrapper for std ::strlen
.Declaration
#0Invokes undefined behavior if the passed string is not null-terminated.template <xieite ::is_ch Ch > [[nodiscard ]]constexpr std ::size_t str_size (Ch * str )noexcept ;
#1
Returnstemplate <xieite ::is_ch Ch ,std ::size_t size > [[nodiscard ]]constexpr std ::size_t str_size (Ch (& )[size ])noexcept ;
size
.Example
Output:import xieite ;int main () {xieite ::dump (xieite ::str_size ("abcdef" )); }
6