55 static void Copy(
char* dest,
const char* src);
58 void Copy(
const char* src);
61 void NCopy(
const char* src,
int n);
65 void Erase(
int start,
int end=-1);
83 static void Duplicate(
char * &store,
const char *src,
bool release=
true);
94 static int Compare(
const char* str1,
const char* str2);
106 static bool Equals(
const char* str1,
const char* str2) {
return Compare(str1, str2) == 0;}
121 static bool EndsWith(
const char* str1,
const char* str2);
129 static char*
Append(
const char* str1,
const char* str2);
194 static bool IsEmpty(
const char *str) {
return (str?str[0]==
'\0':
true);};
210 static wxString
Format(
const char *format, ...);
213 void NPrintf(
unsigned long size,
const char *format, ...);
216 operator const char*()
const {
return GetCStr();}
221 char & operator [] (
const int i);
224 const char operator [] (
const int i)
const;
long albaID
type for IDs inside ALBA
albaBase - the pourpose of this class is just to groups utilities classes
Class Name : albaCString.
albaCString(const char *str)
constructor.
albaMatrix - Time stamped 4x4 Matrix.
albaString - performs common string operations on c-strings.
const bool operator<(const char *a) const
void ExtractPathName()
Extract the pathname from a filename string.
static bool IsEmpty(const char *str)
return true if empty
albaString(const char *src)
albaString & Append(const char *str)
Append a new string to this string.
const bool operator==(const char *src) const
char * GetNonConstCStr()
Return the pointer to the internal c-string, but first force string the internal copy.
const bool operator>(const char *a) const
static char * Duplicate(const char *str)
This method makes a duplicate of a c-string similar to C function strdup but it uses new to create ne...
int FindChr(const int c) const
Scan the string for the first occurrence of the character.
static albaID Length(const char *str)
This static method returns the size of c-string.
static void Duplicate(char *&store, const char *src, bool release=true)
This method makes a duplicate of the string similar to C function strdup but it uses new to create ne...
albaString(const albaString &src)
albaString & operator<<(albaString *s)
static char * ParsePathName(char *str)
void operator>>(std::istream &os)
bool StartsWith(const char *str) const
Check if this string starts with the given one.
void SetCStr(char *a, bool release=false)
this can be used only with non constant c-string
albaString & operator+=(const char *s)
albaString & operator<<(albaMatrix d)
Put inside string a albaMatrix in row order example: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -> "1 0 0 0 0 1 ...
static void Copy(char *dest, const char *src)
static method to copy c-string to the another c-string.
void operator<<(std::ostream &os)
albaString & Set(const char *a, bool release=false)
Set the internal pointer to a give pointer.
albaString & operator=(const char *src)
albaString(const double &num)
void NCopy(const char *src, int n)
Copy N characters of another string to this string.
static bool StartsWith(const char *str1, const char *str2)
Static method to check if the first string starts with the second one.
const char * BaseName() const
char * Duplicate() const
Duplicate the string stored inside this object.
static bool EndsWith(const char *str1, const char *str2)
Static method to check if the first string ends with the second one.
char * ParsePathName()
parse the given string to substitute each (back)slash character with the right pathname separator.
int FindLast(const char *str) const
Find last occurrence of a substring.
albaString & operator<<(double d)
albaString & operator=(const albaString &mat)
bool IsEmpty() const
return true if empty
void Printf(const char *format,...)
Format given arguments according to format string.
void ForceDuplicate()
Force the string to create an internal duplication in place of reference to const char.
void SetPathName(albaString *str)
const char * GetCStr() const
Return the pointer to the internal c-string.
const bool operator!=(const char *src) const
void Erase(int start, int end=-1)
Erase characters from start position to end position.
int GetSize() const
return the real memory size allocated for the internal c-string
void Replace(char from, char to)
Replace each caracter from with to.
const bool operator>=(const char *a) const
void Copy(const char *src)
Copy a c-string to this string.
int SetMaxLength(albaID len)
Pre-Allocate space for the internal c-string.
bool EndsWith(const char *str) const
Check if this string ends with the given one.
albaString & operator=(const double &num)
int SetSize(albaID size)
Allocate space for the internal c-string.
const albaID Length() const
This method returns the size of this string.
char * ParsePathName(albaString *str)
static wxString Format(const char *format,...)
albaString & operator<<(int d)
static const char * BaseName(const char *filename)
Extract the base name of a filename string.
albaString & operator<<(float d)
void NPrintf(unsigned long size, const char *format,...)
like Printf but faster (you can specify output string size)
const bool operator<=(const char *a) const
int FindFirst(const char *str) const
Find first occurrence of a substring.
static bool Equals(const char *str1, const char *str2)
This static method compare two strings.
albaString & operator<<(const char *a)
bool Equals(const char *str) const
This method compare the given c-string with the one stored inside this object.
albaString & operator<<(long d)
static int Compare(const char *str1, const char *str2)
This static method compare two strings.
static char * Append(const char *str1, const char *str2)
Append two strings and produce a new one.
int FindLastChr(const int c) const
Scan the string for the first occurrence of the character.
void SetPathName(const char *str)
parse the given string to substitute each (back)slash character with the right pathname separator.
int Compare(const char *str) const
This method compare the given c-string with the one stored inside this object.