35 typedef const std::string &
csr;
46 void trim( std::string &s);
54 int split(
csr text, std::vector< std::string > & result );
74 class Path :
public std::string
78 std::string::size_type lastSlash()
const;
79 static bool spacePolicy;
124 std::string
base()
const;
129 std::string
dir()
const;
134 std::string
ext()
const;
139 std::string
name()
const;
144 std::string
noExt()
const;
150 void split( std::vector< std::string > &dirs )
const;
171 operator const char * ()
const;
181 static bool check(
const std::string &path );
static bool check(const std::string &path)
checks for valid string
Definition: stringy.cpp:241
bool operator==(const Path &x) const
test for equality
std::string dir() const
Definition: stringy.cpp:485
std::string base() const
Definition: stringy.cpp:464
bool defined() const
type conversion
Definition: stringy.cpp:428
bool absolute() const
Definition: stringy.cpp:363
Path()
Constructor.
Definition: stringy.cpp:188
std::string name() const
Definition: stringy.cpp:518
Path & up()
shorten this by a level
Definition: stringy.cpp:316
std::string ext() const
Definition: stringy.cpp:501
std::string noExt() const
Definition: stringy.cpp:538
static void setSpacePolicy(bool allowSpaces=false)
set policy for spaces in file names
Definition: stringy.cpp:232
Path & operator=(const char *)
assignment
Definition: stringy.cpp:404
Manipulate path strings.
Definition: stringy.h:74
bool isChildOf(const Path &p) const
test for equality
Definition: stringy.cpp:387
std::string clean(csr s)
Remove everything except alpha, digit, space, dot, hyphen and underscore.
Definition: stringy.cpp:169
std::string expandMacros(csr s)
expand a string containing $ macros
Definition: stringy.cpp:110
int split(csr text, std::vector< std::string > &result)
split a string into sub-strings at spaces
Definition: stringy.cpp:54
void trim(std::string &s)
rip off leading and trailing white spaces
Definition: stringy.cpp:37
Path & appendExt(csr ext)
Append an extension to this.
Definition: stringy.cpp:301
const std::string & csr
short cut for string constants
Definition: vici.h:80
const std::string & csr
Save some time typing and shorten parameter lines.
Definition: stringy.h:35
void split(std::vector< std::string > &dirs) const
break into separate dirs
Definition: stringy.cpp:344
Path & append(csr name)
Append aname to a path.
Definition: stringy.cpp:286