RAUL  0.8.0
Public Member Functions | Static Public Member Functions | List of all members
Raul::URI Class Reference

Simple wrapper around standard string with useful URI-specific methods. More...

#include <URI.hpp>

Inheritance diagram for Raul::URI:
Inheritance graph

Public Member Functions

 URI (const std::basic_string< char > &uri="nil:0")
 Construct a URI from an std::string. More...
 
 URI (const char *uri)
 Construct a URI from a C string. More...
 
const std::string chop_start (const std::string &str) const
 Return path with everything up to and including the first occurence of str chopped.
 
std::string chop_scheme () const
 Return the URI with the scheme removed (as a string)
 
std::string scheme () const
 Return the URI scheme (everything before the first ':')
 
const std::string str () const
 
const char * c_str () const
 
std::string substr (size_t start, size_t end=std::string::npos) const
 
bool operator< (const URI &uri) const
 
bool operator<= (const URI &uri) const
 
bool operator== (const URI &uri) const
 
bool operator!= (const URI &uri) const
 
size_t length () const
 
size_t find (const std::string &s) const
 
size_t find_last_of (char c) const
 
 operator Raul::Atom () const
 

Static Public Member Functions

static bool is_valid (const std::basic_string< char > &uri)
 

Detailed Description

Simple wrapper around standard string with useful URI-specific methods.

This "should" be used for proper URIs (RFC3986), but not much support or validation is built-in yet. The URI string MUST have a scheme though.

Constructor & Destructor Documentation

Raul::URI::URI ( const std::basic_string< char > &  uri = "nil:0")
inline

Construct a URI from an std::string.

It is a fatal error to construct a URI from an invalid string, use is_valid first to check.

Referenced by Raul::Path::descendant_comparator().

Raul::URI::URI ( const char *  uri)
inline

Construct a URI from a C string.

It is a fatal error to construct a URI from an invalid string, use is_valid first to check.


The documentation for this class was generated from the following file: