13 template<typename T
, typename Traits
>
14 [[nodiscard
]] constexpr
15 auto sizei(const std::basic_string_view
<T
,Traits
> str
) noexcept
-> int
16 { return static_cast<int>(std::min
<std::size_t>(str
.size(), std::numeric_limits
<int>::max())); }
19 constexpr bool contains(const std::string_view str0
, const std::string_view str1
) noexcept
20 { return str0
.find(str1
) != std::string_view::npos
; }
23 constexpr bool starts_with(const std::string_view str0
, const std::string_view str1
) noexcept
24 { return str0
.substr(0, std::min(str0
.size(), str1
.size())) == str1
; }
27 constexpr bool ends_with(const std::string_view str0
, const std::string_view str1
) noexcept
28 { return str0
.substr(str0
.size() - std::min(str0
.size(), str1
.size())) == str1
; }
31 int case_compare(const std::string_view str0
, const std::string_view str1
) noexcept
;
34 int case_compare(const std::wstring_view str0
, const std::wstring_view str1
) noexcept
;
37 int strcasecmp(const char *str0
, const char *str1
) noexcept
;
39 int strncasecmp(const char *str0
, const char *str1
, std::size_t len
) noexcept
;
43 #endif /* AL_STRING_H */