|
Isis Developer Reference
|
Go to the documentation of this file.
13 #include <QStringList>
20 bool toBool(
const QString &);
21 int toInt(
const QString &);
28 QString
toString(
const unsigned int &);
30 QString
toString(
double,
int precision = 14);
169 IString(
const std::string &str);
173 IString(
const double &num,
const int piPrecision = 14);
180 static std::string
Trim(
const std::string &chars,
const std::string &str);
183 static std::string
TrimHead(
const std::string &chars,
const std::string &str);
186 static std::string
TrimTail(
const std::string &chars,
const std::string &str);
189 static std::string
UpCase(
const std::string &str);
192 static std::string
DownCase(
const std::string &str);
195 static int ToInteger(
const std::string &str);
201 static double ToDouble(
const std::string &str);
203 QString
ToQt()
const;
204 static QString
ToQt(
const std::string &str);
207 static int Split(
const char separator,
const std::string &instr,
208 std::vector<std::string> &tokens,
209 bool allowEmptyEntries =
true);
212 static std::string
Compress(
const std::string &str,
bool force =
false);
215 int maxReplaceCount = 20);
216 static std::string
Replace(
const std::string &str,
217 const std::string &from,
218 const std::string &to,
219 int maxReplacementCount = 20);
221 IString Replace(
const std::string &from,
const std::string &to ,
bool honorquotes);
222 static IString Replace(
const std::string &str,
const std::string &from,
223 const std::string &to ,
bool honorquotes);
226 static std::string
Convert(
const std::string &str,
227 const std::string &listofchars,
234 static std::string
Remove(
const std::string &del,
const std::string &str);
241 operator int()
const {
260 operator double()
const {
291 bool Equal(
const std::string &str)
const;
292 static bool Equal(
const std::string &str1,
const std::string &str2);
294 static std::string
ToStd(
const QString &str);
300 void SetDouble(
const double &value,
const int piPrecision = 14);
303 std::ostream &
operator<<(std::ostream &os,
const QString &
string);
304 std::ostream &
operator<<(std::ostream &os,
const QStringRef &
string);
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.
Definition: IString.cpp:1037
double ToDouble() const
Returns the floating point value the IString represents.
Definition: IString.cpp:799
static bool nocase_compare(const char c1, const char c2)
Compare two characters without regard to case.
Definition: IString.cpp:677
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:314
IString DownCase()
Converts all upper case letters in the object IString into lower case characters.
Definition: IString.cpp:644
IString TrimTail(const std::string &chars)
Trims the input characters from the end of the object IString.
Definition: IString.cpp:587
static std::string ToStd(const QString &str)
Converts a Qt string into a std::string.
Definition: IString.cpp:1333
IString()
Constructs an empty IString object.
Definition: IString.cpp:403
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
IString Trim(const std::string &chars)
Removes characters from the beginning and end of the IString.
Definition: IString.cpp:525
IString ConvertWhiteSpace()
Returns the string with all "new lines", "carriage returns", "tabs", "form feeds",...
Definition: IString.cpp:1238
int ToInteger() const
Returns the object string as an integer.
Definition: IString.cpp:718
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
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"...
Definition: IString.cpp:1196
QString toString(double doubleToConvert, int precision)
Global function to convert a double to a string with the given precision (significant figures).
Definition: IString.cpp:277
IString Compress(bool force=false)
Collapses multiple spaces into single spaces.
Definition: IString.cpp:974
IString UpCase()
Converst any lower case characters in the object IString with uppercase characters.
Definition: IString.cpp:617
BigInt ToBigInteger() const
Returns the BigInt representation of the object IString.
Definition: IString.cpp:758
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
BigInt toBigInt(const QString &string)
Global function to convert from a string to a "big" integer.
Definition: IString.cpp:115
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
IString & operator=(const int &value)
Attempts to convert the stirng to a QStirng (Qt) and return that IString.
Definition: IString.cpp:1301
long long int BigInt
Big int.
Definition: Constants.h:49
Isis exception class.
Definition: IException.h:91
~IString()
Destructor.
Definition: IString.cpp:513
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Namespace for the standard library.
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
Definition: IString.cpp:38
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.
Definition: IString.cpp:940
bool Equal(const std::string &str) const
Compare a string to the object IString.
Definition: IString.cpp:690
IString Token(const IString &separator)
Returns the first token in the IString.
Definition: IString.cpp:897
Adds specific functionality to C++ strings.
Definition: IString.h:165
IString TrimHead(const std::string &chars)
Trims The input characters from the beginning of the object IString.
Definition: IString.cpp:558
IString Remove(const std::string &del)
Remove all instances of any character in the string from the IString.
Definition: IString.cpp:1266
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:869