:relfileprefix: ../../../
[#boost-urls-url_base-c_str]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/url_base.adoc[pass:[url_base]]::c_str


Return the url as a null-terminated string


=== Synopsis

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
char const*
c_str() const noexcept;
----

=== Description


This function returns a pointer to a null
terminated string representing the url,
which may contain percent escapes.
[,cpp]
----
assert( std::strlen( url( "http://www.example.com" ).c_str() ) == 22 );
----

=== Constant.

=== Throws nothing.








