29 #include <QStringList> 36 bool toBool(
const QString &);
37 int toInt(
const QString &);
44 QString
toString(
const unsigned int &);
46 QString
toString(
double,
int precision = 14);
185 IString(
const std::string &str);
189 IString(
const double &num,
const int piPrecision = 14);
196 static std::string
Trim(
const std::string &chars,
const std::string &str);
199 static std::string
TrimHead(
const std::string &chars,
const std::string &str);
202 static std::string
TrimTail(
const std::string &chars,
const std::string &str);
205 static std::string
UpCase(
const std::string &str);
208 static std::string
DownCase(
const std::string &str);
211 static int ToInteger(
const std::string &str);
217 static double ToDouble(
const std::string &str);
219 QString
ToQt()
const;
220 static QString
ToQt(
const std::string &str);
223 static int Split(
const char separator,
const std::string &instr,
224 std::vector<std::string> &tokens,
225 bool allowEmptyEntries =
true);
228 static std::string
Compress(
const std::string &str,
bool force =
false);
231 int maxReplaceCount = 20);
232 static std::string
Replace(
const std::string &str,
233 const std::string &from,
234 const std::string &to,
235 int maxReplacementCount = 20);
237 IString Replace(
const std::string &from,
const std::string &to ,
bool honorquotes);
238 static IString Replace(
const std::string &str,
const std::string &from,
239 const std::string &to ,
bool honorquotes);
242 static std::string
Convert(
const std::string &str,
243 const std::string &listofchars,
250 static std::string
Remove(
const std::string &del,
const std::string &str);
257 operator int()
const {
276 operator double()
const {
307 bool Equal(
const std::string &str)
const;
308 static bool Equal(
const std::string &str1,
const std::string &str2);
310 static std::string
ToStd(
const QString &str);
316 void SetDouble(
const double &value,
const int piPrecision = 14);
319 std::ostream &
operator<<(std::ostream &os,
const QString &
string);
320 std::ostream &
operator<<(std::ostream &os,
const QStringRef &
string);
long long int BigInt
Big int.
IString()
Constructs an empty IString object.
static std::string ToStd(const QString &str)
Converts a Qt string into a std::string.
double ToDouble() const
Returns the floating point value the IString represents.
int toInt(const QString &string)
Global function to convert from a string to an integer.
IString & operator=(const int &value)
Attempts to convert the stirng to a QStirng (Qt) and return that IString.
IString TrimHead(const std::string &chars)
Trims The input characters from the beginning of the object IString.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
int ToInteger() const
Returns the object string as an integer.
static int Split(const char separator, const std::string &instr, std::vector< std::string > &tokens, bool allowEmptyEntries=true)
Find separators between characters and split them into strings.
BigInt toBigInt(const QString &string)
Global function to convert from a string to a "big" integer.
double toDouble(const QString &string)
Global function to convert from a string to a double.
IString Compress(bool force=false)
Collapses multiple spaces into single spaces.
IString Token(const IString &separator)
Returns the first token in the IString.
IString Convert(const std::string &listofchars, const char &to)
Returns the string with all occurrences of any character in the "from" argument converted to the "to"...
QString ToQt() const
Retuns the object string as a QString.
IString Remove(const std::string &del)
Remove all instances of any character in the string from the IString.
IString DownCase()
Converts all upper case letters in the object IString into lower case characters. ...
void SetDouble(const double &value, const int piPrecision=14)
Performs the conversion necessary to represent a floating-point value as a string.
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
bool Equal(const std::string &str) const
Compare a string to the object IString.
IString Replace(const std::string &from, const std::string &to, int maxReplaceCount=20)
Replaces all instances of the first input string with the second input string.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
IString ConvertWhiteSpace()
Returns the string with all "new lines", "carriage returns", "tabs", "form feeds", "vertical tabs" and "back spaces" converted to single spaces.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
IString UpCase()
Converst any lower case characters in the object IString with uppercase characters.
BigInt ToBigInteger() const
Returns the BigInt representation of the object IString.
IString TrimTail(const std::string &chars)
Trims the input characters from the end of the object IString.
IString Trim(const std::string &chars)
Removes characters from the beginning and end of the IString.