Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 9fc5439165.
PrevUpHomeNext

pct_string_view

A reference to a valid percent-encoded string.

Synopsis

Defined in header <boost/url/pct_string_view.hpp>

class pct_string_view :
    public grammar::string_view_base
Types

Name

Description

const_iterator

The const iterator type.

const_pointer

The const pointer type.

const_reference

The const reference type.

const_reverse_iterator

The const reverse iterator type.

difference_type

The difference type.

iterator

The iterator type.

pointer

The pointer type.

reference

The reference type.

reverse_iterator

The reverse iterator type.

size_type

The size type.

traits_type

The character traits.

value_type

The value type.

Member Functions

Name

Description

at

Access a character.

back

Return the last character.

begin

Return an iterator to the beginning.

cbegin

Return an iterator to the beginning.

cend

Return an iterator to the end.

compare

Return the result of comparing to another string.

contains

Return true if matching characters are found.

copy

Copy the characters to another buffer.

crbegin

Return a reverse iterator to the end.

crend

Return a reverse iterator to the beginning.

data

Return a pointer to the character buffer.

decode

Return the string with percent-decoding.

decoded_size

Return the decoded size.

empty

Return true if the string is empty.

end

Return an iterator to the end.

ends_with

Return true if a matching suffix exists.

find

Return the position of matching characters.

find_first_not_of

Return the position of the first non-match.

find_first_of

Return the position of the first match.

find_last_not_of

Return the position of the last non-match.

find_last_of

Return the position of the last match.

front

Return the first character.

length

Return the size.

max_size

Return the maximum allowed size.

operator=

Assignment.

operator *

Return the string as a range of decoded characters.

operator[]

Access a character.

operator std::string

Conversion.

operator std::string_view

Conversion.

operator string_view

Conversion.

pct_string_view [constructor]

Constructor.

Constructor (deleted)

rbegin

Return a reverse iterator to the end.

rend

Return a reverse iterator to the beginning.

rfind

Return the position of matching characters.

size

Return the size.

starts_with

Return true if a matching prefix exists.

substr

Return a view to part of the string.

swap

Swap.

Protected Member Functions

Name

Description

swap

Swap.

Static Members

Name

Description

npos

A constant used to represent "no position".

Protected Data Members

Name

Description

s_

The referenced character buffer.

Friends

Name

Description

make_pct_string_view

Return a validated percent-encoded string.

Description

Objects of this type behave like a string_view and have the same interface, but offer an additional invariant: they can only be constructed from strings containing valid percent-escapes. Attempting construction from a string containing invalid or malformed percent escapes results in an exception.

Convenience header <boost/url.hpp>


PrevUpHomeNext