Add UniformResourceLocator::empty

This commit is contained in:
Vinnie Falco
2013-09-11 18:12:11 -07:00
parent ae324fba94
commit ee728e3dbc
2 changed files with 8 additions and 0 deletions

View File

@@ -69,6 +69,11 @@ UniformResourceLocator& UniformResourceLocator::operator= (UniformResourceLocato
//------------------------------------------------------------------------------
bool UniformResourceLocator::empty () const
{
return m_scheme == String::empty;
}
String UniformResourceLocator::scheme () const
{
return m_scheme;

View File

@@ -46,6 +46,9 @@ public:
/** Copy assign a URL. */
UniformResourceLocator& operator= (UniformResourceLocator const& other);
/** Returns `true` if this is an empty URL. */
bool empty () const;
/** Returns the scheme of the URL.
If no scheme was specified, the string will be empty.
*/