Isis 3 Programmer Reference
Isis::IString Class Reference

Adds specific functionality to C++ strings. More...

#include <IString.h>

Inheritance diagram for Isis::IString:
Inheritance graph
Collaboration diagram for Isis::IString:
Collaboration graph

Public Member Functions

 IString ()
 Constructs an empty IString object. More...
 
 IString (const std::string &str)
 Constructs a IString object with initial value set to the string argument. More...
 
 IString (const IString &str)
 Constructs a IString with initial value set to the IString argument. More...
 
 IString (const char *str)
 Constructs a IString with initial value set to the argument. More...
 
 IString (const int &num)
 Constructs a IString object with its initial value set to the string representation of the int argument. More...
 
 IString (const double &num, const int piPrecision=14)
 Constructs a IString object with its initial value set to the string representation of the double argument. More...
 
 IString (const BigInt &num)
 Constructs a IString object with its initial value set to the string representation of the BigInt argument. More...
 
 IString (const QString &str)
 Constructs a IString object with initial value set to the input QString. More...
 
 ~IString ()
 Destructor. More...
 
IString Trim (const std::string &chars)
 Removes characters from the beginning and end of the IString. More...
 
IString TrimHead (const std::string &chars)
 Trims The input characters from the beginning of the object IString. More...
 
IString TrimTail (const std::string &chars)
 Trims the input characters from the end of the object IString. More...
 
IString UpCase ()
 Converst any lower case characters in the object IString with uppercase characters. More...
 
IString DownCase ()
 Converts all upper case letters in the object IString into lower case characters. More...
 
int ToInteger () const
 Returns the object string as an integer. More...
 
BigInt ToBigInteger () const
 Returns the BigInt representation of the object IString. More...
 
double ToDouble () const
 Returns the floating point value the IString represents. More...
 
QString ToQt () const
 Retuns the object string as a QString. More...
 
IString Token (const IString &separator)
 Returns the first token in the IString. More...
 
IString Compress (bool force=false)
 Collapses multiple spaces into single spaces. More...
 
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. More...
 
IString Replace (const std::string &from, const std::string &to, bool honorquotes)
 Replaces all instances of the first input string with the second input string. More...
 
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" argument. More...
 
IString ConvertWhiteSpace ()
 Returns the string with all "new lines", "carriage returns", "tabs", "form feeds", "vertical tabs" and "back spaces" converted to single spaces. More...
 
IString Remove (const std::string &del)
 Remove all instances of any character in the string from the IString. More...
 
 operator int () const
 Attempts to convert the stirng to a 32 bit integer and return that int. More...
 
 operator BigInt () const
 Attempts to convert the stirng to a 64 bit integer and return that int. More...
 
 operator double () const
 Attempts to convert the stirng to a 64 bit double and return that double. More...
 
IStringoperator= (const int &value)
 Attempts to convert the stirng to a QStirng (Qt) and return that IString. More...
 
IStringoperator= (const BigInt &value)
 Attempts to convert a 64 bit integer into its string representation. More...
 
IStringoperator= (const double &value)
 Attempts to convert double into its string representation. More...
 
bool Equal (const std::string &str) const
 Compare a string to the object IString. More...
 

Static Public Member Functions

static std::string Trim (const std::string &chars, const std::string &str)
 Removes all occurences of the input characters from the beginning and end of the input string. More...
 
static std::string TrimHead (const std::string &chars, const std::string &str)
 Trims the input characters from the beginning of the input string. More...
 
static std::string TrimTail (const std::string &chars, const std::string &str)
 Trims the input characters from the end of the input string. More...
 
static std::string UpCase (const std::string &str)
 Converts lower case characters in the input string to upper case characters. More...
 
static std::string DownCase (const std::string &str)
 Converts all upper case letters in the input string into lower case characters. More...
 
static int ToInteger (const std::string &str)
 Returns the integer representation of the input string. More...
 
static BigInt ToBigInteger (const std::string &str)
 Returns the Big Integer representation of the input string. More...
 
static double ToDouble (const std::string &str)
 Returns the floating-point value represented by the input string. More...
 
static QString ToQt (const std::string &str)
 Returns the input string as a QString. More...
 
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. More...
 
static std::string Compress (const std::string &str, bool force=false)
 Returns the input string with multiple spaces collapsed into single spaces. More...
 
static std::string Replace (const std::string &str, const std::string &from, const std::string &to, int maxReplacementCount=20)
 Replace specified substring with replacement substring in a string. More...
 
static IString Replace (const std::string &str, const std::string &from, const std::string &to, bool honorquotes)
 Replace specified substring with replacement substring in a string honoring quotes if requested. More...
 
static std::string Convert (const std::string &str, const std::string &listofchars, const char &to)
 Converts all occurences in the input string of any character in the "from" string to the "to" character. More...
 
static std::string ConvertWhiteSpace (const std::string &str)
 Converts all forms of whitespace in the input string into single spaces. More...
 
static std::string Remove (const std::string &del, const std::string &str)
 Remove all instances of any character in the "del" argument from the input string. More...
 
static bool Equal (const std::string &str1, const std::string &str2)
 Compare two strings, case-insensitive. More...
 
static std::string ToStd (const QString &str)
 Converts a Qt string into a std::string. More...
 
static QStringList ToQt (const std::vector< std::string > &sl)
 Converts a vector of strings into a QStringList. More...
 
static std::vector< std::string > ToStd (const QStringList &sl)
 Converts a QStringList into a vector of strings. More...
 

Private Member Functions

void SetDouble (const double &value, const int piPrecision=14)
 Performs the conversion necessary to represent a floating-point value as a string. More...
 

Detailed Description

Adds specific functionality to C++ strings.

This class extends the standard C++ string class with specific functionality useable by ISIS programmers.

Author
2002-09-10 Stuart Sides
History:

2003-02-05 Jeff Anderson - Modified the constructor routine which accepts a type of double (i.e., conversion of a double to a string). The constructor now generates nice output as indicated in the documentation.

2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...

2003-05-30 Jeff Anderson - Updated unitTest and truth file to account for optimzation changes

2003-05-30 Stuart Sides - Modified conversion of double to string constructor to output 14 place of accuracy

2003-06-24 Stuart Sides - Modified UpCase and DownCase to use the transform from the STL instead of looping and converting individual chars

2003-06-25 Stuart Sides - Added member function to remove all characters which are in the parameter from the object string (Remove)

2003-06-25 Stuart Sides - Added documentation for new member (Remove)

2003-07-17 Stuart Sides - Fixed bug in Convert. It sometimes would not convert any characters even though it should have. find_first_of should be "!=npos" instead of ">0".

2003-08-14 Stuart Sides - Fixed bug in Token. It would not parse "a","b" correctly.

2004-02-20 Stuart Sides - Added ability for ToDouble to convert PDS hex values to a double

2004-04-14 Jeff Anderson - Added (int) (double) and (string) cast conversions and operator= methods

2005-02-15 Elizabeth Ribelin - Modified file to support Doxygen documentation

2005-05-20 Jeff Anderson - Added BigInt methods

2008-07-14 Steven Lambright - Made some members const

2008-07-16 Steven Lambright - Added support for double nans and inifinities

2010-03-18 Sharmila Prasad - Ability to set the exact precision digits for double

2010-09-27 Sharmila Prasad - Moved ParseExpression from ControlNetFilter to IString class

2010-10-04 Sharmila Prasad - Remove redundant ParseExpression

2011-06-16 Jai Rideout - Fixed size of double string buffer to work with doubles that are -DBLMAX

2012-08-20 Steven Lambright - Deprecated. Please use IString instead of IString or std::string. This file now provides toBool(), toInt(), toBigInt(), toDouble(), and toString() which are not deprecated. Renamed from iString to IString to better match our new naming conventions and because this class isn't going to be removed overnight. Here are some equivalents to IString functionality: Trim() - Please use IString::trimmed(), IString::simplified() or IString::remove(QRegExp("(^[abc]*|[abc]*$)")) TrimHead() - Please use IString::trimmed(), IString::simplified() or IString::remove(QRegExp("^[abc]*")) TrimTail() - Please use IString::trimmed(), IString::simplified() or IString::remove(QRegExp("[abc]*$")) UpCase() - Please use IString::toUpper() DownCase() - Please use IString::toLower() ToQt() - N/A Token() - Please use IString::split() or IString::section() Split() - Please use IString::split() Replace() - Please use IString::replace(). If you need to respect quotes, please create a standard-compliant static method Convert() - Please use IString::replace() ConvertWhiteSpace() - Please use IString::simplified() or IString::replace(QRegExp("\\s"), " ") Remove() - Please use IString::remove() operator IString() - N/A Equal() - Please use operator==() ToStd() - Please use IString::toStdString() ToQt(vector) - This is not a string operation, it's more of a string list operation. ToStd(IStringList) - This is not a string operation, it's more of a string list operation. operator int()/ToInteger() - see the new function toInt() operator double()/ToDouble() - see the new function toDouble() operator BigInt()/ToBigInteger() - see the new function toBigInt() operator=(const int &) - toString() handles this operator=(const BigInt &) - toString() handles this operator=(const double &) - toString() handles this SetDouble() - No longer necessary, only one method converts from a double to a string Compress() - Please use IString::trimmed(), IString::simplified() or IString::replace(). If you need to respect quotes, please create a standard-compliant static method.

2012-10-13 Kris Becker - Fixed compatability issue with Qt on MacOSX

2012-12-18 Steven Lambright - Isis' API now only utilizes QStrings. Please use the toString(...) and to*(QString) (i.e. toBool(QString), toInt(QString), ...) methods. All public API's should use/expect QString (not IString, not std::string). This affects virtually every class in Isis. Fixes #1312.

2017-08-30 Tyler Wilson and Ian Humphrey - Added std:: namespace to isnan to avoid ambiguity error when compiling for c++11. References #4809.

History:
2006-01-23 Jacob Danton - Changed the scientific notation start value (from 0.1 to 0.0001)
History:
2007-06-05 Brendan George - Merged with StringTools
History:
2007-07-17 Steven Lambright - Fixed bug where -0.0 would result in SetDouble
History:
2007-07-25 Steven Koechle - Fixed a bug where one of the TrimTail methods was calling erase incorrectly.
History:
2008-02-08 Steven Koechle - Keeps Convert from infinite looping
History:
2008-02-22 Steven Koechle - Added a Replace method that honors quotes
History:
2008-06-12 Jeannie Walldren - Fixed a bug in Compress method so that it is able to deal with multiple quotations within the string
History:
2008-06-18 Stuart Sides - Fixed doc error
History:
2005-02-15 Stuart Sides - add coded and implementation examples to class documentation and document IString(const char *str), and private methods
History:
2009-11-02 Mackenzie Boyd - Modified Token method to ignore any quote groupings. Problems arose with current method and unclosed quotes.

Definition at line 181 of file IString.h.

Constructor & Destructor Documentation

◆ IString() [1/8]

Isis::IString::IString ( )

Constructs an empty IString object.

Deprecated:

Definition at line 418 of file IString.cpp.

Referenced by Replace().

◆ IString() [2/8]

Isis::IString::IString ( const std::string &  str)

Constructs a IString object with initial value set to the string argument.

Deprecated:
Parameters
strThe initial value of the IString

Definition at line 429 of file IString.cpp.

◆ IString() [3/8]

Isis::IString::IString ( const IString str)

Constructs a IString with initial value set to the IString argument.

Deprecated:
Parameters
strThe initial value of the IString

Definition at line 439 of file IString.cpp.

◆ IString() [4/8]

Isis::IString::IString ( const char *  str)

Constructs a IString with initial value set to the argument.

Deprecated:
Parameters
strThe inital value of the IString

Definition at line 449 of file IString.cpp.

◆ IString() [5/8]

Isis::IString::IString ( const int &  num)

Constructs a IString object with its initial value set to the string representation of the int argument.

Deprecated:
Parameters
numThe initial value of the IString. The integer value is converted to a string representation and stored as the value.

Definition at line 461 of file IString.cpp.

◆ IString() [6/8]

Isis::IString::IString ( const double &  num,
const int  piPrecision = 14 
)

Constructs a IString object with its initial value set to the string representation of the double argument.

Deprecated:
Parameters
numThe initial value of the IString. The double value is converted to a string representation and stored as the value. The conversion is handled in the following manner: If (abs(num) < 0.1) it is presented in scientific notation If (abs(log10(num)) < 16) it is presented in normal notation if (abs(log10(num)) >= 16) it is presented in scientific notation Trailing zeros are removed such that 5.000 is presented as 5.0

Definition at line 496 of file IString.cpp.

References SetDouble().

◆ IString() [7/8]

Isis::IString::IString ( const BigInt num)

Constructs a IString object with its initial value set to the string representation of the BigInt argument.

Deprecated:
Parameters
numThe initial value of the IString. The integer value is converted to a string representation and stored as the value.

Definition at line 476 of file IString.cpp.

◆ IString() [8/8]

Isis::IString::IString ( const QString &  str)

Constructs a IString object with initial value set to the input QString.

Deprecated:
Parameters
str

Definition at line 519 of file IString.cpp.

◆ ~IString()

Isis::IString::~IString ( )

Destructor.

Deprecated:

Definition at line 528 of file IString.cpp.

Member Function Documentation

◆ Compress() [1/2]

IString Isis::IString::Compress ( bool  force = false)

Collapses multiple spaces into single spaces.

Deprecated:
Parameters
forceDetermines whether to compress inside quotes (single and double)

Definition at line 989 of file IString.cpp.

Referenced by Isis::UserInterface::loadBatchList().

◆ Compress() [2/2]

std::string Isis::IString::Compress ( const std::string &  str,
bool  force = false 
)
static

Returns the input string with multiple spaces collapsed into single spaces.

Deprecated:
Parameters
strThe string to be compressed
forceDetermines whether to compress inside quotes
Returns
string The compressed version of the input string

Definition at line 1005 of file IString.cpp.

◆ Convert() [1/2]

IString Isis::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" argument.

The original string is modified.

Deprecated:
Parameters
listofcharsThe string of characters to be replaced. The order of the characters is not important.
toThe single character used as the replacement.
Returns
IString

Definition at line 1211 of file IString.cpp.

Referenced by ConvertWhiteSpace(), Isis::ImageFileListWidget::fromPvl(), and Isis::ImageFileListWidget::toPvl().

◆ Convert() [2/2]

string Isis::IString::Convert ( const std::string &  str,
const std::string &  listofchars,
const char &  to 
)
static

Converts all occurences in the input string of any character in the "from" string to the "to" character.

Deprecated:
Parameters
strThe input string
listofcharsThe string of characters to be replaced. The order of the characters is unimportant
toThe single character used as replacement
Returns
string The converted string (the input string is unmodified)

Definition at line 1231 of file IString.cpp.

◆ ConvertWhiteSpace() [1/2]

IString Isis::IString::ConvertWhiteSpace ( )

Returns the string with all "new lines", "carriage returns", "tabs", "form feeds", "vertical tabs" and "back spaces" converted to single spaces.

All quotes are ignored. The original string is modified.

Deprecated:
Returns
IString

Definition at line 1253 of file IString.cpp.

Referenced by Isis::MocLabels::InitWago(), and Isis::PvlKeyword::stringEqual().

◆ ConvertWhiteSpace() [2/2]

std::string Isis::IString::ConvertWhiteSpace ( const std::string &  str)
static

Converts all forms of whitespace in the input string into single spaces.

Deprecated:
Parameters
str
Returns
string

Definition at line 1267 of file IString.cpp.

References Convert().

◆ DownCase() [1/2]

◆ DownCase() [2/2]

std::string Isis::IString::DownCase ( const std::string &  str)
static

Converts all upper case letters in the input string into lower case characters.

Deprecated:
Parameters
str
Returns
string

Definition at line 674 of file IString.cpp.

◆ Equal() [1/2]

bool Isis::IString::Equal ( const std::string &  str) const

Compare a string to the object IString.

Deprecated:
Parameters
strThe string with which the comparison is made
Returns
bool True if they are equal, false if they are not.

Definition at line 705 of file IString.cpp.

Referenced by Isis::DatabaseFactory::remove().

◆ Equal() [2/2]

bool Isis::IString::Equal ( const std::string &  str1,
const std::string &  str2 
)
static

Compare two strings, case-insensitive.

Deprecated:
Parameters
str1[in] The first string to compare
str2[in] The second string to compare
Returns
True if the two input strings are identical otherwise false

Definition at line 720 of file IString.cpp.

References Isis::nocase_compare().

◆ operator BigInt()

Isis::IString::operator BigInt ( ) const
inline

Attempts to convert the stirng to a 64 bit integer and return that int.

Returns
BigInt

Definition at line 267 of file IString.h.

References ToBigInteger().

◆ operator double()

Isis::IString::operator double ( ) const
inline

Attempts to convert the stirng to a 64 bit double and return that double.

Returns
double

Definition at line 276 of file IString.h.

References ToDouble().

◆ operator int()

Isis::IString::operator int ( ) const
inline

Attempts to convert the stirng to a 32 bit integer and return that int.

Returns
int

Definition at line 257 of file IString.h.

References ToInteger().

◆ operator=() [1/3]

IString & Isis::IString::operator= ( const int &  value)

Attempts to convert the stirng to a QStirng (Qt) and return that IString.

Attempts to convert a 32 bit integer into its string representation.

Returns
IString
Deprecated:
Parameters
value[in] The 32 bit integer to be converted to a string
Returns
The Isis::IString representation of the int

Definition at line 1316 of file IString.cpp.

◆ operator=() [2/3]

IString & Isis::IString::operator= ( const BigInt value)

Attempts to convert a 64 bit integer into its string representation.

Deprecated:
Parameters
value[in] The 64 bit integer to be converted to a string
Returns
The Isis::IString representation of the BigInt

Definition at line 1332 of file IString.cpp.

◆ operator=() [3/3]

IString& Isis::IString::operator= ( const double &  value)
inline

Attempts to convert double into its string representation.

Parameters
value[in] The double to be converted to a string
Returns
The IString representation of the double

Definition at line 302 of file IString.h.

References SetDouble().

◆ Remove() [1/2]

IString Isis::IString::Remove ( const std::string &  del)

Remove all instances of any character in the string from the IString.

Deprecated:
Parameters
delThe characters to be removed from the IString. The character is unimportant
Returns
IString

Definition at line 1281 of file IString.cpp.

Referenced by Isis::InfixToPostfix::convert(), Isis::MocLabels::InitWago(), and Isis::PvlKeyword::stringEqual().

◆ Remove() [2/2]

std::string Isis::IString::Remove ( const std::string &  str,
const std::string &  del 
)
static

Remove all instances of any character in the "del" argument from the input string.

Deprecated:
Parameters
strThe string from which characters are to be removed
delThe string of characters to be removed. Order is unimportant.
Returns
string The string with the characters removed. The original string is unmodified

Definition at line 1300 of file IString.cpp.

◆ Replace() [1/4]

IString Isis::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.

For more information, see IString::Replace(const string, const string, const string, int)

Deprecated:
Parameters
fromSearch string that when found in str, it is replaced with to
toIString that will replace every occurance of from in str.
maxReplaceCountMaximum number of replacements to allow per call

Definition at line 1052 of file IString.cpp.

References IString().

Referenced by Isis::UserInterface::loadBatchList(), and Replace().

◆ Replace() [2/4]

std::string Isis::IString::Replace ( const std::string &  str,
const std::string &  from,
const std::string &  to,
int  maxReplaceCount = 20 
)
static

Replace specified substring with replacement substring in a string.

This method accepts a string, a target substring and a replacement substring with the intent to find all occurances of the subTarg substring in s and replace them with the substring subRep. The maxReplaceCount parameter is so that a should the replacement substring contain the target substring, an infinite loop would occur.

Note that the search for strings are implemented as a loop that always starts at the begining of s. So should the above scenario occur, it will be limited.

I have found this useful for formulating database SQL queries in a loop. The following example illustrates this usage:

string pntDist = "distance(giscpt,UPCPoint(%longitude,%latitude))";
string pntQuery = "SELECT pointid, latitude, longitude, radius, "
" %distance AS Distance FROM " + pntTable +
" WHERE (%distance <= " + IString(maxDist) + ")";
SqlQuery finder; // Uses whatever the default database is
while (!theEndOfTime()) {
IString longitude(source.getLongitude());
IString latitude(source.getLatitude());
string qDist = StringTools::replace(pntDist,"%longitude", longitude);
qDist = StringTools::replace(qDist,"%latitude", latitude);
string query = StringTools::replace(pntQuery, "%distance", qDist);
finder.exec(query);
... // Do what you will with the results!
}

This routine is case sensitive and will only replace exact matches.

To prevent infinite recursion, where the replace string contains the search string, use the maxReplaceCount to adjust appropriately.

Deprecated:
Parameters
strInput string to search and replace substrings
fromSearch string that when found in str, it is replaced with to
toIString that will replace every occurance of from in str.
maxReplaceCountMaximum number of replacements to allow per call
Returns
std::string NEw string with from replaced with to

Definition at line 1106 of file IString.cpp.

◆ Replace() [3/4]

IString Isis::IString::Replace ( const std::string &  from,
const std::string &  to,
bool  honorquotes 
)

Replaces all instances of the first input string with the second input string.

Honoring quotes if requested by the boolean

Deprecated:
Parameters
fromSearch string that when found in str, it is replaced with to.
toIString that will replace every occurance of from in str.
honorquotesSet to true to honor quotes and not replace inside them
Returns
IString New string with subTarg replaced with subRep

Definition at line 1138 of file IString.cpp.

References Replace().

◆ Replace() [4/4]

IString Isis::IString::Replace ( const std::string &  str,
const std::string &  from,
const std::string &  to,
bool  honorquotes 
)
static

Replace specified substring with replacement substring in a string honoring quotes if requested.

This routine is case sensitive and will only replace exact matches.

Deprecated:
Parameters
strInput string to search and replace substrings in
fromSearch string that when found in str, it is replaced with to.
toIString that will replace every occurance of from in str.
honorquotesSet to true to honor quotes and not replace inside them
Returns
IString New string with subTarg replaced with subRep

Definition at line 1162 of file IString.cpp.

◆ SetDouble()

void Isis::IString::SetDouble ( const double &  num,
const int  piPrecision = 14 
)
private

Performs the conversion necessary to represent a floating-point value as a string.

See IString (const double &num) for details

Deprecated:
Parameters
numThe input value to be stored

Definition at line 509 of file IString.cpp.

References Isis::toString().

Referenced by IString(), and operator=().

◆ Split()

int Isis::IString::Split ( const char  separator,
const std::string &  str,
std::vector< std::string > &  tokens,
bool  allowEmptyEntries = true 
)
static

Find separators between characters and split them into strings.

This method will break up the input string into tokens that are separated by one or more of the specified character. If allowEmptyEntries == true, then one or separator characters are deem a single separator and the string is split into two different sections. If allowEmptyEntries == false, then should more than one separator character occur in succession, this will result in the number of separator characters less one empty strings returned to the caller.

Deprecated:
Parameters
separatorA single character that separates each substring
strThe string to break into separate fields or tokens
tokensA vector of strings that will receive the tokens as separated by the separator character.
allowEmptyEntriesIf true, treat successive separator characters as a single separator. If false, successive separator characters result in empty strings/tokens.
Returns
int The number of fields/tokens found in str

Definition at line 955 of file IString.cpp.

◆ ToBigInteger() [1/2]

BigInt Isis::IString::ToBigInteger ( ) const

Returns the BigInt representation of the object IString.

Deprecated:
Returns
BigInt The Big Integer representation of the IString

Definition at line 773 of file IString.cpp.

Referenced by operator BigInt().

◆ ToBigInteger() [2/2]

BigInt Isis::IString::ToBigInteger ( const std::string &  str)
static

Returns the Big Integer representation of the input string.

Deprecated:
Parameters
strThe string representing an integer value
Returns
BigInt The string as a BigInt

Definition at line 786 of file IString.cpp.

References _FILEINFO_, and Isis::IException::Unknown.

◆ ToDouble() [1/2]

double Isis::IString::ToDouble ( ) const

Returns the floating point value the IString represents.

Deprecated:
Returns
double The IString as a double

Definition at line 814 of file IString.cpp.

Referenced by Isis::ImportPdsTable::extract(), IsisAml::GetDouble(), Isis::MocLabels::InitWago(), operator double(), Isis::CubeCalculator::prepareCalculations(), Isis::iTime::Second(), and IsisAml::Verify().

◆ ToDouble() [2/2]

double Isis::IString::ToDouble ( const std::string &  str)
static

Returns the floating-point value represented by the input string.

Deprecated:
Parameters
strThe string representing the numeric value
Returns
double The number the string represents

Definition at line 827 of file IString.cpp.

References _FILEINFO_, and Isis::IException::Unknown.

◆ ToInteger() [1/2]

◆ ToInteger() [2/2]

int Isis::IString::ToInteger ( const std::string &  str)
static

Returns the integer representation of the input string.

Deprecated:
Parameters
strThe string representing an integer value
Returns
int The integer value represented by the string

Definition at line 746 of file IString.cpp.

References _FILEINFO_, and Isis::IException::Unknown.

◆ Token()

IString Isis::IString::Token ( const IString separator)

Returns the first token in the IString.

A token is defined as a string of characters from the beginning of the string to, but not including, the first character matching any character in the separator string. The token is removed from the original string along with the separator.

Deprecated:
Parameters
separatorThe string of characters used to separate tokens. The order of the characters is not important.
Returns
IString

Definition at line 912 of file IString.cpp.

Referenced by Isis::PvlKeyword::addCommentWrapped(), Isis::InfixToPostfix::cleanSpaces(), Isis::InfixToPostfix::convert(), Isis::ProcessImportFits::extractFitsLabels(), Isis::InfixToPostfix::formatFunctionCalls(), Isis::MocLabels::InitWago(), Isis::KernelDb::matches(), Isis::CubeCalculator::prepareCalculations(), Isis::FileList::read(), Isis::CissLabels::ReadLabels(), Isis::UserInterface::SetBatchList(), Isis::MinnaertEmpirical::SetPhotoKList(), Isis::LunarLambertEmpirical::SetPhotoLList(), Isis::LunarLambertEmpirical::SetPhotoPhaseCurveList(), Isis::MinnaertEmpirical::SetPhotoPhaseCurveList(), Isis::MinnaertEmpirical::SetPhotoPhaseList(), and Isis::LunarLambertEmpirical::SetPhotoPhaseList().

◆ ToQt() [1/3]

◆ ToQt() [2/3]

QString Isis::IString::ToQt ( const std::string &  s)
static

Returns the input string as a QString.

Deprecated:
Parameters
s[in] The standard string to be converted to a Qt string

Definition at line 895 of file IString.cpp.

◆ ToQt() [3/3]

QStringList Isis::IString::ToQt ( const std::vector< std::string > &  sl)
static

Converts a vector of strings into a QStringList.

Deprecated:
Parameters
slSTL vector of strings
Returns
QStringList

Definition at line 1361 of file IString.cpp.

References ToQt().

◆ ToStd() [1/2]

std::string Isis::IString::ToStd ( const QString &  str)
static

Converts a Qt string into a std::string.

Deprecated:
Parameters
str[in] The Qt string to be converted to a std::string
Returns
The std::string representation of the Qt string

Definition at line 1348 of file IString.cpp.

Referenced by Isis::SqlQuery::fieldName(), Isis::SqlQuery::fieldNameList(), Isis::SqlQuery::getQuery(), Isis::SqlQuery::tossQueryError(), and ToStd().

◆ ToStd() [2/2]

std::vector< std::string > Isis::IString::ToStd ( const QStringList sl)
static

Converts a QStringList into a vector of strings.

Deprecated:
Parameters
sl
Returns
vector<string>

Definition at line 1378 of file IString.cpp.

References ToStd().

◆ Trim() [1/2]

IString Isis::IString::Trim ( const std::string &  chars)

Removes characters from the beginning and end of the IString.

The order of the characters makes no difference.

Deprecated:
Parameters
charsThe string of characters to be trimmed
Returns
IString

Definition at line 540 of file IString.cpp.

References TrimHead(), and TrimTail().

Referenced by IsisAml::CommandLine(), Isis::ImportPdsTable::extract(), Isis::Kernels::getTypes(), Isis::MocLabels::InitWago(), and Isis::Kernels::resolveType().

◆ Trim() [2/2]

std::string Isis::IString::Trim ( const std::string &  chars,
const std::string &  str 
)
static

Removes all occurences of the input characters from the beginning and end of the input string.

Deprecated:
Parameters
charsThe string of characters to be removed. Order makes no difference
strThe input string to be trimmed
Returns
string The result of the trimming operation

Definition at line 559 of file IString.cpp.

References TrimHead(), and TrimTail().

◆ TrimHead() [1/2]

IString Isis::IString::TrimHead ( const std::string &  chars)

Trims The input characters from the beginning of the object IString.

Deprecated:
Parameters
charsThe string of characters to be trimmed. Order makes no difference

Definition at line 573 of file IString.cpp.

Referenced by Isis::ProcessImportFits::extractFitsLabels(), Isis::FileList::read(), and Trim().

◆ TrimHead() [2/2]

std::string Isis::IString::TrimHead ( const std::string &  chars,
const std::string &  str 
)
static

Trims the input characters from the beginning of the input string.

Deprecated:
Parameters
charsThe input characters to be removed. Order makes no difference
strThe string to be trimmed
Returns
string The resulting string

Definition at line 588 of file IString.cpp.

◆ TrimTail() [1/2]

IString Isis::IString::TrimTail ( const std::string &  chars)

Trims the input characters from the end of the object IString.

Deprecated:
Parameters
charsThe string of characters to be removed. Order is irrelevant

Definition at line 602 of file IString.cpp.

Referenced by Isis::ProcessImportFits::extractFitsLabels(), Isis::FileList::read(), and Trim().

◆ TrimTail() [2/2]

std::string Isis::IString::TrimTail ( const std::string &  chars,
const std::string &  str 
)
static

Trims the input characters from the end of the input string.

Deprecated:
Parameters
charsThe characters to be removed from the input string. Order does not matter, all characters are treated individually.
strThe string to be trimmed
Returns
string The result of the trimming

Definition at line 619 of file IString.cpp.

◆ UpCase() [1/2]

◆ UpCase() [2/2]

std::string Isis::IString::UpCase ( const std::string &  str)
static

Converts lower case characters in the input string to upper case characters.

Deprecated:
Parameters
strThe string to be converted
Returns
string The result of the conversion

Definition at line 647 of file IString.cpp.


The documentation for this class was generated from the following files: