Orcus
Classes | Public Member Functions | Friends | List of all members
orcus::pstring Class Reference

#include <pstring.hpp>

Classes

struct  hash
 

Public Member Functions

 pstring (const char *_pos)
 
 pstring (const char *_pos, size_t _size)
 
::std::string str () const
 
size_t size () const
 
const char & operator[] (size_t idx) const
 
pstringoperator= (const pstring &r)
 
const char * get () const
 
bool operator== (const pstring &r) const
 
bool operator!= (const pstring &r) const
 
bool operator< (const pstring &r) const
 
bool operator== (const char *_str) const
 
bool operator!= (const char *_str) const
 
pstring trim () const
 
bool empty () const
 
void clear ()
 
void resize (size_t new_size)
 

Friends

friend::std::ostream & operator<< (::std::ostream &os, const pstring &str)
 

Detailed Description

This string class does not store any char arrays, but it only stores the position of the first char in the memory, and the size of the char array.