13 template<typename
...Ts
>
14 [[nodiscard
]] constexpr
15 auto sizei(const std::basic_string_view
<Ts
...> str
) noexcept
-> int
16 { return static_cast<int>(std::min
<std::size_t>(str
.size(), std::numeric_limits
<int>::max())); }
18 template<typename
...Ts
>
19 [[nodiscard
]] constexpr
20 auto sizei(const std::basic_string
<Ts
...> &str
) noexcept
-> int
21 { return static_cast<int>(std::min
<std::size_t>(str
.size(), std::numeric_limits
<int>::max())); }
25 constexpr bool contains(const std::string_view str0
, const std::string_view str1
) noexcept
26 { return str0
.find(str1
) != std::string_view::npos
; }
29 constexpr bool starts_with(const std::string_view str0
, const std::string_view str1
) noexcept
30 { return str0
.substr(0, std::min(str0
.size(), str1
.size())) == str1
; }
33 constexpr bool ends_with(const std::string_view str0
, const std::string_view str1
) noexcept
34 { return str0
.substr(str0
.size() - std::min(str0
.size(), str1
.size())) == str1
; }
37 int case_compare(const std::string_view str0
, const std::string_view str1
) noexcept
;
40 int case_compare(const std::wstring_view str0
, const std::wstring_view str1
) noexcept
;
44 #endif /* AL_STRING_H */