13 #ifndef FFA_STRING_EXT_H
14 #define FFA_STRING_EXT_H
32 snprintf(buf,128,format,val);
40 snprintf(buf,128,format,val);
48 snprintf(buf,128,format,val);
56 snprintf(buf,128,format,val);
61 FFaNumStr(
int val) { this->append(std::to_string(val)); }
63 FFaNumStr(
unsigned int val) { this->append(std::to_string(val)); }
65 FFaNumStr(
long int val) { this->append(std::to_string(val)); }
68 FFaNumStr(
double val,
char f =
'g',
int precision = 6);
69 FFaNumStr(
double val,
int integerDigits,
int precision = 12,
70 double ceiling = 1.0e+7,
double floor = 1.0e-5,
71 bool useDigitGrouping =
false);
85 this->reserve(s.length());
86 for (
size_t i = 0; i < s.length(); i++)
87 this->
operator+=(tolower(s[i]));
102 this->reserve(s.length());
103 for (
size_t i = 0; i < s.length(); i++)
104 this->
operator+=(toupper(s[i]));
130 std::string
getTextAfter(
const char*,
const char* end = NULL)
const;
Extension of the STL string class for lower-case strings only.
Definition: FFaStringExt.H:80
FFaLowerCaseString(const std::string &s)
The copy constructor converts the string to lower case.
Definition: FFaStringExt.H:83
Extension of the STL string class converting numbers to a text string.
Definition: FFaStringExt.H:26
FFaNumStr(int val)
Constructor converting an integer value.
Definition: FFaStringExt.H:61
FFaNumStr(unsigned int val)
Constructor converting an unsigned integer value.
Definition: FFaStringExt.H:63
FFaNumStr(const char *format, size_t val)
Constructor converting an integer value with a format string.
Definition: FFaStringExt.H:37
FFaNumStr(long int val)
Constructor converting a long integer value.
Definition: FFaStringExt.H:65
FFaNumStr(const char *format, float val)
Constructor converting a float value with a format string.
Definition: FFaStringExt.H:45
FFaNumStr(const char *format, int val)
Constructor converting an integer value with a format string.
Definition: FFaStringExt.H:29
FFaNumStr(const char *format, double val)
Constructor converting a double value with a format string.
Definition: FFaStringExt.H:53
Extension of the STL string class with some parsing methods.
Definition: FFaStringExt.H:115
int getIntAfter(const char *) const
Parses an integer after the specified substring.
Definition: FFaStringExt.C:130
int getIntsAfter(const char *, const int, int *) const
Parses a list of integers after the specified substring.
Definition: FFaStringExt.C:148
size_t getPosAfterString(const char *) const
Returns the position of the specified substring.
Definition: FFaStringExt.C:107
std::string getTextAfter(const char *, const char *end=NULL) const
Parses a text string after the specified substring.
Definition: FFaStringExt.C:196
int getDoublesAfter(const char *, const int, double *) const
Parses a list of doubles after the specified substring.
Definition: FFaStringExt.C:172
double getDoubleAfter(const char *) const
Parses a double after the specified substring.
Definition: FFaStringExt.C:139
FFaString(const std::string &s)
Copy constructor.
Definition: FFaStringExt.H:118
bool hasSubString(const char *) const
Checks if the string contains the specified substring.
Definition: FFaStringExt.C:124
Extension of the STL string class for upper-case strings only.
Definition: FFaStringExt.H:97
FFaUpperCaseString(const std::string &s)
The copy constructor converts the string to upper case.
Definition: FFaStringExt.H:100