mirror of
https://github.com/boostorg/static_string.git
synced 2025-07-29 12:07:42 +02:00
Added starts/ends_with
This commit is contained in:
committed by
GitHub
parent
b2e2215783
commit
fbc0de2528
@ -1899,6 +1899,48 @@ public:
|
||||
c, pos);
|
||||
}
|
||||
|
||||
bool
|
||||
starts_with(
|
||||
string_view_type s) const noexcept
|
||||
{
|
||||
return string_view_type(*this).starts_with(s);
|
||||
}
|
||||
|
||||
bool
|
||||
starts_with(
|
||||
CharT c) const noexcept
|
||||
{
|
||||
return string_view_type(*this).starts_with(c);
|
||||
}
|
||||
|
||||
bool
|
||||
starts_with(
|
||||
const CharT* s) const
|
||||
{
|
||||
return string_view_type(*this).starts_with(s);
|
||||
}
|
||||
|
||||
bool
|
||||
ends_with(
|
||||
string_view_type s) const noexcept
|
||||
{
|
||||
return string_view_type(*this).ends_with(s);
|
||||
}
|
||||
|
||||
bool
|
||||
ends_with(
|
||||
CharT c) const noexcept
|
||||
{
|
||||
return string_view_type(*this).ends_with(c);
|
||||
}
|
||||
|
||||
bool
|
||||
ends_with(
|
||||
const CharT* s) const
|
||||
{
|
||||
return string_view_type(*this).ends_with(s);
|
||||
}
|
||||
|
||||
private:
|
||||
fixed_string&
|
||||
assign_char(CharT ch, std::true_type);
|
||||
|
Reference in New Issue
Block a user