:relfileprefix: ../../
[#boost-urls-encode]

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

== Members



Apply percent-encoding to a string


[source,cpp,subs="verbatim,macros,-callouts"]
----
template<class CharSet>
xref:std.adoc[std]::size_t
xref:boost/urls/encode-09.adoc[pass:[encode]](
    char* dest,
    xref:std.adoc[std]::size_t size,
    core::string_view s,
    CharSet const& unreserved,
    xref:boost/urls/encoding_opts.adoc[encoding_opts] opt = = {});
  xref:boost/urls/encode-09.adoc[pass:c,q,m[*_» more..._*]]
----



Return a percent-encoded string


[source,cpp,subs="verbatim,macros,-callouts"]
----
template<
    class StringToken = xref:boost/urls/string_token.adoc[string_token]::xref:boost/urls/string_token/return_string.adoc[return_string],
    class CharSet>
StringToken::result_type
xref:boost/urls/encode-04.adoc[pass:[encode]](
    core::string_view s,
    CharSet const& unreserved,
    xref:boost/urls/encoding_opts.adoc[encoding_opts] opt = = {},
    StringToken&& token) noexcept;
  xref:boost/urls/encode-04.adoc[pass:c,q,m[*_» more..._*]]
----

