Public Member Functions |
| | DtFilename () |
| | default constructor
|
| | DtFilename (const char *str) |
| | constructor
|
| virtual | ~DtFilename () |
| | destructor
|
| | DtFilename (const DtFilename &orig) |
| | copy constructor
|
| DtFilename & | operator= (const DtFilename &orig) |
| | assignment operator
|
| DtFilename & | operator= (const DtString &orig) |
| | assignment operators
|
| DtFilename & | operator= (const char *orig) |
| | assignment operators
|
| virtual bool | absolute () const |
| | Returns true if the filename is an absolute filename, or a relative filename, respectively.
|
| virtual bool | relative () const |
| virtual void | append (DtFilename const &filename) |
| | This filename is considered a path and the supplied filename is appended.
|
| virtual void | prepend (DtFilename const &pathName) |
| | This filename is considered a relative path (or filename) and the supplied path is prepended.
|
| virtual DtString | extension () const |
| | Returns the file extension, which are all the characters following the last '.
|
| virtual void | setExtension (const DtString &extension) |
| | Sets the extension for the filename, if the existing file has an extension it is removed, else this extension is appended.
|
| virtual void | stripFilename () |
| | Strip the filename from this path.
|
| virtual void | stripPath () |
| | Strip the path from this filename.
|
| virtual void | stripExtension () |
| | Strip the extension from the filename.
|
| virtual bool | isWritable () const |
| | Returns true if the filename is writable.
|
| virtual bool | isReadable () const |
| | Return true if the filename is readable.
|
| virtual unsigned long | fileLength () const |
| | Returns the size of the file in bytes.
|
| virtual bool | exists () const |
| | Returns true if the filename exists.
|
| | DtString () |
| | default constructor, creates an empty string
|
| | DtString (const char *str) |
| | additional constructors
|
| | DtString (const char *str, int length) |
| | fixed length string constructor
|
| virtual | ~DtString () |
| | destructor
|
| | DtString (const DtString &orig) |
| | copy constructor
|
| virtual | operator const char * () const |
| | cast operator
|
| DtString * | clone () const |
| | clone operator
|
| virtual void | tokenize (const char delimiter, std::vector< DtString > &tokens) const |
| | Tokenize the string baseed on the input character.
|
| virtual int | toInt (bool *ok=0) const |
| | Conversion to integer, if ok is provided ok is set if conversion succeeds.
|
| virtual unsigned int | toUInt (bool *ok=0) const |
| | Conversion to unsigned integer, if ok is provided ok is set if conversion succeeds.
|
| virtual float | toFloat (bool *ok=0) const |
| | Convert to floating point.
|
| virtual double | toDouble (bool *ok=0) const |
| | Convert to double precision floating point.
|
| virtual bool | toBoolean (bool *ok=0) const |
| | Convert to double precision floating point.
|
| virtual void | toUpper () |
| | Convert this string's alphabetic characters to uppercase.
|
| virtual void | toLower () |
| | Convert this string's alphabetic characters to lowercase.
|
| virtual int | findChar (const char ch) |
| | Search the string for first occurrence of a character and return its index.
|
| virtual int | findLastChar (const char ch) |
| | Search the string for the last occurrence of a character and return its index.
|
| virtual int | findString (const DtString &string) const |
| | Search the string for the first occurrence of another string and return the starting index.
|
| virtual int | findLastString (const DtString &string) |
| | Search the string for the last occurrence of another string and return the starting index.
|
| bool | snipFrontToLast (const char ch) |
| bool | snipBackToFirst (const char ch) |
| virtual int | count (const char ch) const |
| | Returns the number of occurrences of the character.
|
| virtual int | length () const |
| | length() - Exactly the same as size():
|
| virtual int | size () const |
| | size() - returns the length of the string not including the terminating '\0'
|
| const char * | string () const |
| | string() - Returns a char * representation of the DtString: deprecated
|
| const char * | c_str () const |
| | Returns a char* representation of the DtString;.
|
| bool | isEmpty () const |
| | returns true if the string is empty, where empty is size() == 0
|
| | DtString (double val) |
| | Constructors for creating DtString representations of numbers.
|
| | DtString (int val) |
| | Constructors for creating DtString representations of numbers.
|
| | DtString (long val) |
| | Constructors for creating DtString representations of numbers.
|
| | DtString (char val) |
| | Constructors for creating DtString representations of numbers.
|
| | DtString (unsigned int val) |
| | Constructors for creating DtString representations of numbers.
|
| | DtString (unsigned long val) |
| | Constructors for creating DtString representations of numbers.
|
| virtual bool | caseCompare (const DtString &str) const |
| | Case-insensitive string compare.
|
| virtual bool | caseCompare (const char *str) const |
| | Case-insensitive string compare.
|
| virtual const char & | operator[] (int index) const |
| | index operator
|
| virtual char & | operator[] (int index) |
| | index operator
|
| virtual bool | snipFront (const char ch, bool toLastCh=false) |
| | Truncates everything before or after the character, including the character, respectively.
|
| virtual bool | snipBack (const char ch, bool fromFirstCh=false) |
| | Truncates everything before or after the character, including the character, respectively.
|
| virtual bool | chompFront () |
| | Remove all whitespace at front or back of a string.
|
| virtual bool | chompBack () |
| | Remove all whitespace at front or back of a string.
|
| virtual bool | operator== (const char *str) const |
| | comparison operators
|
| virtual bool | operator< (const char *str) const |
| | comparison operators
|
| virtual bool | operator<= (const char *str) const |
| | comparison operators
|
| virtual bool | operator> (const char *str) const |
| | comparison operators
|
| virtual bool | operator>= (const char *str) const |
| | comparison operators
|
| virtual bool | operator!= (const char *str) const |
| | comparison operators
|
| virtual DtString | operator+ (const char *str) const |
| | concatenation operators
|
| virtual DtString & | operator+= (const char *str) |
| | concatenation operators
|
| virtual DtString & | operator+= (const DtString &str) |
| | concatenation operators
|
Instances of DtFilename are DtStrings which convert filenames to the native format.