35 typedef const std::string &
csr;
46 void trim( std::string &s);
54 int split(
csr text, std::vector< std::string > & result );
67 class Path :
public std::string
71 std::string::size_type lastSlash()
const;
72 static bool spacePolicy;
117 std::string
base()
const;
122 std::string
dir()
const;
127 std::string
ext()
const;
132 std::string
name()
const;
137 std::string
noExt()
const;
143 void split( std::vector< std::string > &dirs )
const;
164 operator const char * ()
const;
174 static bool check(
const std::string &path );
bool isChildOf(const Path &p) const
test for equality
Definition: stringy.cpp:366
Path & appendExt(csr ext)
Append an extension to this.
Definition: stringy.cpp:280
std::string name() const
Definition: stringy.cpp:497
Path & operator=(const char *)
assignment
Definition: stringy.cpp:383
std::string noExt() const
Definition: stringy.cpp:517
std::string dir() const
Definition: stringy.cpp:464
Path & append(csr name)
Append aname to a path.
Definition: stringy.cpp:265
bool defined() const
type conversion
Definition: stringy.cpp:407
Manipulate path strings.
Definition: stringy.h:67
Path & up()
shorten this by a level
Definition: stringy.cpp:295
void split(std::vector< std::string > &dirs) const
break into separate dirs
Definition: stringy.cpp:323
Path()
Constructor.
Definition: stringy.cpp:169
bool absolute() const
Definition: stringy.cpp:342
std::string base() const
Definition: stringy.cpp:443
bool operator==(const Path &x) const
test for equality
std::string expandMacros(csr s)
expand a string containing $ macros
Definition: stringy.cpp:108
const std::string & csr
Save some time typing and shorten parameter lines.
Definition: stringy.h:35
std::string ext() const
Definition: stringy.cpp:480
void trim(std::string &s)
rip off leading and trailing white spaces
Definition: stringy.cpp:37
static void setSpacePolicy(bool allowSpaces=false)
set policy for spaces in file names
Definition: stringy.cpp:211
int split(csr text, std::vector< std::string > &result)
split a string into sub-strings at spaces
Definition: stringy.cpp:53
static bool check(const std::string &path)
checks for valid string
Definition: stringy.cpp:220