:relfileprefix: ../../../
[#boost-urls-pct_string_view-2constructor-06]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/pct_string_view.adoc[pass:[pct_string_view]]::pct_string_view


Constructor


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/pct_string_view.hpp#L210[boost/url/pct_string_view.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
pct_string_view(
    char const* s,
    std::size_t len);
----

=== Description


The newly constructed string references
the specified character buffer. Ownership
is not transferred.
[,cpp]
----
this->data() == s && this->size() == len
----

=== Linear in `len`.

=== Exceptions thrown on invalid input.



=== Exceptions

|===
| Name | Thrown on

| `The`
| 
string contains an invalid percent encoding.

|===



=== Parameters

|===
| Name | Description 

| *s,*
| 
len The string to construct from.

|===




