All the functionality here is inlined since they are farily small functions.
All functions here will throw gpstk::StringUtils::StringException on an error. Any std::exception is converted to a gpstk::StringUtils::StringException so that's the only exception a user of this class needs to catch.
For any function that modifies a string, make sure there is a non-const (std::string&) version and a const (const std::string&) version. The convention for writing the functions is the non-const version fully implements the function and the const version calls the non-const version.
Classes | |
| class | StringException |
| This is thrown instread of a std::exception when a gpstk::StringUtils function fails. More... | |
| class | HexDumpDataConfig |
| Class for configuring the appearance of hexDumpData() output. More... | |
Functions | |
| std::string | asString (const VariableSet &vset) |
| std::string | asString (const Variable &v) |
| std::string | asString (const CarrierCode &cc) throw () |
| Decode Carrier Code to a string. | |
| std::string | asString (const RangeCode &rc) throw () |
| Decode Range Code to a string. | |
| std::string | asString (const NavCode &nc) throw () |
| Decode Navigation Message Code to a string. | |
| std::string | asString (const ExternalFrequencyStatus &e) throw () |
| Decode external frequency status to a string. | |
| std::string | asString (const ObsID &p) |
| convert this object to a string representation | |
| std::string | asRinex3ID (const ObsID &p) |
| std::string | asString (const SatID &p) |
| std::string | asString (const SourceID &p) |
| Convert this object to a string representation. | |
| void | hexDumpData (std::ostream &s, const std::string &data, unsigned indent=0, HexDumpDataConfig cfg=HexDumpDataConfig()) |
| Perform a formatted hex-dump of the (potentially) binary data to the given stream. | |
| void | hexDumpData (std::ostream &s, const std::string &data, const std::string &tag, HexDumpDataConfig cfg=HexDumpDataConfig()) |
| Perform a formatted hex-dump of the (potentially) binary data to the given stream. | |
| std::string & | stripLeading (std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning of another string. | |
| std::string | stripLeading (const std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning of another string const version. | |
| std::string & | stripLeading (std::string &s, const char *pString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning of another string. | |
| std::string | stripLeading (const std::string &s, const char *pString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning of another string const version. | |
| std::string & | stripLeading (std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip character(s) from the beginning of a string. | |
| std::string | stripLeading (const std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip character(s) from the beginning of a string const version. | |
| std::string & | stripLeading (std::string &s, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip blanks from the beginning of a string. | |
| std::string | stripLeading (const std::string &s, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip blanks from the beginning of a string const version. | |
| std::string & | stripTrailing (std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the end of another string. | |
| std::string | stripTrailing (const std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the end of another string const version. | |
| std::string & | stripTrailing (std::string &s, const char *pString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the end of another string. | |
| std::string | stripTrailing (const std::string &s, const char *pString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the end of another string const version. | |
| std::string & | stripTrailing (std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip character(s) from the end of a string. | |
| std::string | stripTrailing (const std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip character(s) from the end of a string const version. | |
| std::string & | stripTrailing (std::string &s, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip blanks from the end of a string. | |
| std::string | stripTrailing (const std::string &s, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip blanks from the end of a string const version. | |
| std::string & | strip (std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning and end of another string. | |
| std::string | strip (const std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning and end of another string const version. | |
| std::string & | strip (std::string &s, const char *pString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning and end of another string. | |
| std::string | strip (const std::string &s, const char *pString, std::string::size_type num=std::string::npos) throw (StringException) |
| Remove a string from the beginning and end of another string cosnt version. | |
| std::string & | strip (std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip character(s) from the beginning and end of a string. | |
| std::string | strip (const std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip character(s) from the beginning and end of a string const version. | |
| std::string & | strip (std::string &s, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip blanks from the beginning and end of a string. | |
| std::string | strip (const std::string &s, std::string::size_type num=std::string::npos) throw (StringException) |
| Strip blanks from the beginning and end of a string const version. | |
| std::string | translate (const std::string &aString, const std::string &inputChars, const std::string &outputChars, const char pad= ' ') |
| Converts all of the receiver's characters that are in the first specified string to the corresponding character in the second specified string. | |
| std::string | change (const std::string &aString, const std::string &inputString, const std::string &outputString, std::string::size_type startPos=0, unsigned numChanges=(std::numeric_limits< unsigned >::max)()) |
| Changes occurrences of a specified pattern to a specified replacement string. | |
| std::string & | change (std::string &aString, const std::string &inputString, const std::string &outputString, std::string::size_type startPos=0, unsigned numChanges=(std::numeric_limits< unsigned >::max)()) |
| Changes occurrences of a specified pattern to a specified replacement string. | |
| std::string & | rightJustify (std::string &s, const std::string::size_type length, const char pad= ' ') throw (StringException) |
| Right-justifies the receiver in a string of the specified length. | |
| std::string | rightJustify (const std::string &s, const std::string::size_type length, const char pad= ' ') throw (StringException) |
| Right-justifies the receiver in a string of the specified length (const version). | |
| std::string & | leftJustify (std::string &s, const std::string::size_type length, const char pad= ' ') throw (StringException) |
| Left-justifies the receiver in a string of the specified length. | |
| std::string | leftJustify (const std::string &s, const std::string::size_type length, const char pad= ' ') throw (StringException) |
| Left-justifies the receiver in a string of the specified length (const version). | |
| std::string & | center (std::string &s, const std::string::size_type length, const char pad= ' ') throw (StringException) |
| Change the length of a string by adding to the beginning and end. | |
| std::string | center (const std::string &s, const std::string::size_type length, const char pad= ' ') throw (StringException) |
| Change the length of a string by adding to the beginning and end (const version). | |
| double | asDouble (const std::string &s) |
| Convert a string to a double precision floating point number. | |
| long | asInt (const std::string &s) |
| Convert a string to an integer. | |
| unsigned long | asUnsigned (const std::string &s) |
| Convert a string to an unsigned integer. | |
| float | asFloat (const std::string &s) throw (StringException) |
| Convert a string to a single precision floating point number. | |
| long double | asLongDouble (const std::string &s) throw (StringException) |
| Convert a string to a big precision floating point number. | |
| template<class X> | |
| X | asData (const std::string &s) throw (StringException) |
| Convert a value in a string to a type specified by the template class. | |
| std::string | asString (const long double x, const std::string::size_type precision=21) |
| Convert a long double to a string in fixed notation. | |
| std::string | asString (const double x, const std::string::size_type precision=17) |
| Convert a double to a string in fixed notation. | |
| template<class X> | |
| std::string | asString (const X x) |
| Convert any old object to a string. | |
| std::string & | d2x (std::string &s) throw (StringException) |
| Convert a decimal string to a hexadecimal string. | |
| std::string | d2x (const std::string &s) throw (StringException) |
| Convert a decimal string to a hexadecimal string. | |
| std::string & | x2d (std::string &s) throw (StringException) |
| std::string | x2d (const std::string &s) throw (StringException) |
| Convert a hexadecimal string to a decimal string. | |
| std::string & | c2x (std::string &s) throw (StringException) |
| Convert a character string to a hexadecimal string. | |
| std::string | c2x (const std::string &s) throw (StringException) |
| Convert a character string to a hexadecimal string. | |
| unsigned int | x2int (const std::string &s) throw (StringException) |
| std::string | int2x (const unsigned int &i) throw (StringException) |
| Convert an int to a string. | |
| std::string & | replaceAll (std::string &s, const std::string &oldString, const std::string &newString) throw (StringException) |
| Replace all instances of oldString with newString in s. | |
| bool | isDigitString (const std::string &s) |
| isDigitString is exactly like the C function isDigit except it checks all the characters of string s to see if they are all digits. | |
| bool | isDecimalString (const std::string &s) |
| isDecimalString is like isDigitString() except it allows a single period ('.') character in the string. | |
| bool | isScientificString (const std::string &s) |
| isScientificString extends isDecimalString() to allow a single exponent (E,e,D,d) character between a decimal string and a (possibly empty) digit string. | |
| bool | isAlphaString (const std::string &s) |
| isAlphaString is exactly like the C function isAlpha except it checks all the characters of string s to see if they are all alphabet characters. | |
| std::string | matches (const std::string &s, const std::string &aPattern, const char zeroOrMore= '*', const char oneOrMore= '+', const char anyChar= '.') throw (StringException) |
| Perform pattern matching on strings. | |
| bool | isLike (const std::string &s, const std::string &aPattern, const char zeroOrMore= '*', const char oneOrMore= '+', const char anyChar= '.') throw (StringException) |
| Perform pattern matching on strings. | |
| bool | isLike (const std::string &s, const char *pPattern, const char zeroOrMore= '*', const char oneOrMore= '+', const char anyChar= '.') throw (StringException) |
| Perform pattern matching on strings. | |
| template<class T> | |
| std::string | formattedPrint (const std::string &fmt, const std::string &pat, const std::string &rep, T to) throw (StringException) |
| Work-horse method for printf. | |
| std::string | subString (const std::string &s, const std::string::size_type startPos=0, const std::string::size_type length=std::string::npos, const char pad= ' ') throw (StringException) |
| Get a substring of a string. | |
| std::string & | lowerCase (std::string &s) |
| Change all upper-case letters in a string to lower-case. | |
| std::string | lowerCase (const std::string &s) |
| Change all upper-case letters in a string to lower-case. | |
| std::string & | upperCase (std::string &s) |
| Change all lower-case letters in a string to upper-case. | |
| std::string | upperCase (const std::string &s) |
| Change all lower-case letters in a string to upper-case. | |
| std::string | memToString (const void *p, const std::string::size_type size) |
| Make a string from a void pointer. | |
| std::string | firstWord (const std::string &s, const char delimiter= ' ') throw (StringException) |
| Returns the first word in string s without modifying the string. | |
| int | numWords (const std::string &s, const char delimiter= ' ') throw (StringException) |
| Counts the number of words in s and returns it. | |
| std::string | words (const std::string &s, const std::string::size_type firstWord=0, const std::string::size_type numWords=std::string::npos, const char delimiter= ' ') throw (StringException) |
| Returns numWords words starting with firstWord from s (if any). | |
| std::string | word (const std::string &s, const std::string::size_type wordNum=0, const char delimiter= ' ') throw (StringException) |
| Returns word number wordNum from s (if any). | |
| std::string | stripFirstWord (std::string &s, const char delimiter= ' ') throw (StringException) |
| Removes the first word off string s and returns it. | |
| std::string & | removeWords (std::string &s, const std::string::size_type first=0, const std::string::size_type wordsToReplace=std::string::npos, const char delimiter= ' ') throw (StringException) |
| Removes indicated words from the string s. | |
| std::string | doub2sci (const double &d, const std::string::size_type length, const std::string::size_type expLen, const bool showSign=true, const bool checkSwitch=true) |
| Convert a double to a scientific notation number. | |
| std::string & | sci2for (std::string &aStr, const std::string::size_type startPos=0, const std::string::size_type length=std::string::npos, const std::string::size_type expLen=3, const bool checkSwitch=true) throw (StringException) |
| Convert scientific notation to FORTRAN notation. | |
| std::string | doub2for (const double &d, const std::string::size_type length, const std::string::size_type expLen, const bool checkSwitch=true) throw (StringException) |
| Convert double precision floating point to a string containing the number in FORTRAN notation. | |
| double | for2doub (const std::string &aStr, const std::string::size_type startPos=0, const std::string::size_type length=std::string::npos) |
| Convert FORTRAN representation of a double precision floating point in a string to a number. | |
| std::string | printable (const std::string &aStr) throw (StringException) |
| Change a string into printable characters. | |
| std::string & | prettyPrint (std::string &aStr, const std::string &lineDelim="\n", const std::string &indent="", const std::string &firstIndent=" ", const std::string::size_type len=80, const char wordDelim= ' ') throw (StringException) |
| Nicely expands the input string into several lines, non-const version. | |
| std::string | prettyPrint (const std::string &aStr, const std::string &lineDelim="\n", const std::string &indent="", const std::string &firstIndent=" ", const std::string::size_type len=80, const char wordDelim= ' ') throw (StringException) |
| Const version of prettyPrint, which nicely expands the input string into several lines. | |
| std::vector< std::string > | split (const std::string &aStr, const std::string &theDelimiters=" ", bool trimWhitespace=false, bool ignoreEmpty=true) |
| Split a string by some delimiters. | |
| std::string | asString (const TypeID &p) |
| convert this object to a string representation | |
|
|
Definition at line 373 of file ObsID.cpp. References ObsID::asRinex3ID(). |
|
|
|
Convert this object to a string representation.
Definition at line 150 of file SourceID.cpp. References SourceID::dump(). |
|
|
Definition at line 164 of file SatID.hpp. References SatID::dump(). |
|
|
convert this object to a string representation
Definition at line 365 of file ObsID.cpp. References ObsID::dump(). |
|
|
Decode external frequency status to a string.
Definition at line 142 of file miscenum.hpp. References gpstk::efsLocked, and gpstk::efsNotLocked. |
|
|
Decode Navigation Message Code to a string.
Definition at line 126 of file miscenum.hpp. References gpstk::ncICD_200_2, gpstk::ncICD_200_4, gpstk::ncICD_700_M, and gpstk::ncICD_705_L5. |
|
|
Decode Range Code to a string.
Definition at line 105 of file miscenum.hpp. References gpstk::rcCA, gpstk::rcCL, gpstk::rcCM, gpstk::rcCMCL, gpstk::rcCodeless, gpstk::rcMcode1, gpstk::rcMcode2, gpstk::rcPcode, and gpstk::rcYcode. |
|
|
Decode Carrier Code to a string.
Definition at line 90 of file miscenum.hpp. References gpstk::ccL1, gpstk::ccL2, and gpstk::ccL5. |
|
|
Definition at line 374 of file Variable.hpp. References Variable::getSatellite(), Variable::getSatIndexed(), Variable::getSource(), Variable::getSourceIndexed(), Variable::getType(), and Variable::getTypeIndexed(). |
|
|
Definition at line 330 of file Equation.hpp. References Variable::getType(). Referenced by FICData::reallyGetRecord(). |
1.3.9.1