forked from boostorg/beast
Documentation work
This commit is contained in:
@@ -467,6 +467,19 @@ find(string_view name) const ->
|
||||
return list_.iterator_to(*it);
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
auto
|
||||
basic_fields<Allocator>::
|
||||
find(field name) const ->
|
||||
iterator
|
||||
{
|
||||
auto const it = set_.find(
|
||||
to_string(name), less{});
|
||||
if(it == set_.end())
|
||||
return list_.end();
|
||||
return list_.iterator_to(*it);
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
string_view const
|
||||
basic_fields<Allocator>::
|
||||
@@ -478,6 +491,17 @@ operator[](string_view name) const
|
||||
return it->value();
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
string_view const
|
||||
basic_fields<Allocator>::
|
||||
operator[](field name) const
|
||||
{
|
||||
auto const it = find(name);
|
||||
if(it == end())
|
||||
return {};
|
||||
return it->value();
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
void
|
||||
basic_fields<Allocator>::
|
||||
@@ -547,6 +571,16 @@ replace(string_view name, string_view value)
|
||||
insert(name, value);
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
void
|
||||
basic_fields<Allocator>::
|
||||
replace(field name, string_view value)
|
||||
{
|
||||
value = detail::trim(value);
|
||||
erase(name);
|
||||
insert(name, value);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Fields
|
||||
|
||||
Reference in New Issue
Block a user