39 Path& parse(
const OdAnsiString&
name,
const char* delimeters =
"/\\");
42 Path& add(
const OdAnsiString& part);
43 void append(
const OdAnsiString& part);
47 Path(
const OdAnsiString& path);
50 Path(
const char* path);
51 static const char*
Walk(
const char* szPath,
const char* delimeters =
"/\\");
67 if(
size()>0 && part==
".." &&
last() !=
"..") {
78 inline const char*
Path::Walk(
const char* path,
const char* delimeters) {
80 while((ch[0] = *path)) {
81 if(::strpbrk(delimeters, ch))
87 inline Path& Path::parse(
const OdAnsiString& path,
const char* delimeters) {
88 OdAnsiString astr(path);
89 for(
int i=0; !astr.isEmpty(); i=0) {
90 i = astr.findOneOf(delimeters);
92 astr = astr.right(astr.getLength()-1);
101 astr = astr.right(astr.getLength()-i);
107 return Path::parse(OdAnsiString(
OdString(path)), OdAnsiString(
OdString(delimeters)));
114 inline Path& Path::add(
const OdAnsiString& part) {
append(part);
return *
this; }
115 inline Path& Path::add(
const Path& path) {
append(path);
return *
this; }
134 res += (sep +
at(i));
static const char * Walk(const char *szPath, const char *delimeters="/\\")
Path operator+(const OdAnsiString &path) const
OdString asStr(bool asdir=false, char sepch='/') const
Path & operator+=(const OdAnsiString &path)
OdArray(size_type physicalLength, int growLength=8)
typename A::size_type size_type
OdString & at(size_type arrayIndex)
GLuint const GLchar * name