Stuff to make the C++ string class a little easier to use.
All functions here will throw gnsstk::StringUtils::StringException on an error. Any std::exception is converted to a gnsstk::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 | HexDumpDataConfig |
Class for configuring the appearance of hexDumpData() output. More... | |
Enumerations | |
enum | FFAlign { FFAlign::Left, FFAlign::Right } |
Alignment of data for floatFormat() More... | |
enum | FFLead { FFLead::Zero, FFLead::Decimal, FFLead::NonZero } |
Leading character for floatFormat(), after any whitespace or sign. More... | |
enum | FFSign { FFSign::NegOnly, FFSign::NegSpace, FFSign::NegPos } |
How to handle sign in floatFormat() More... | |
Functions | |
AngleType | asAngleType (const std::string &s) noexcept |
Convert a string name to an AngleType. More... | |
CarrierBand | asCarrierBand (const std::string &s) noexcept |
Convert a string name to an CarrierBand. More... | |
CorrDupHandling | asCorrDupHandling (const std::string &s) noexcept |
Convert a string name to an CorrDupHandling. More... | |
CorrectorType | asCorrectorType (const std::string &s) noexcept |
Convert a string name to an CorrectorType. More... | |
template<class X > | |
X | asData (const std::string &s) |
double | asDouble (const std::string &s) |
DumpDetail | asDumpDetail (const std::string &s) noexcept |
Convert a string name to an DumpDetail. More... | |
float | asFloat (const std::string &s) |
GalDataValid | asGalDataValid (const std::string &s) noexcept |
Convert a string name to an GalDataValid. More... | |
GalHealthStatus | asGalHealthStatus (const std::string &s) noexcept |
Convert a string name to an GalHealthStatus. More... | |
IERSConvention | asIERSConvention (const std::string &s) |
Convert a string representation of IERSConvention to an enum. More... | |
long | asInt (const std::string &s) |
IonexStoreStrategy | asIonexStoreStrategy (const std::string &s) |
Convert a string name to an IonexStoreStrategy. More... | |
long double | asLongDouble (const std::string &s) |
NavMessageType | asNavMessageType (const std::string &s) noexcept |
Convert a string name to an NavMessageType. More... | |
NavSearchOrder | asNavSearchOrder (const std::string &s) |
Convert a string name to an NavSearchOrder. More... | |
NavType | asNavType (const std::string &s) noexcept |
Convert a string name to an NavType. More... | |
NavValidityType | asNavValidityType (const std::string &s) noexcept |
Convert a string name to an NavValidityType. More... | |
ObservationType | asObservationType (const std::string &s) noexcept |
Convert a string name to an ObservationType. More... | |
ReferenceFrame | asReferenceFrame (const std::string &s) |
Convert a string representation of ReferenceFrame to an enum. More... | |
RefFrameRlz | asRefFrameRlz (const std::string &s) noexcept |
Convert a string name to an RefFrameRlz. More... | |
RefFrameSys | asRefFrameSys (const std::string &s) noexcept |
Convert a string name to an RefFrameSys. More... | |
SatelliteSystem | asSatelliteSystem (const std::string &s) noexcept |
Convert a string name to an SatelliteSystem. More... | |
std::string | asString (AngleType e) noexcept |
Convert a AngleType to a whitespace-free string name. More... | |
std::string | asString (CarrierBand e) noexcept |
Convert a CarrierBand to a whitespace-free string name. More... | |
std::string | asString (const double x, const std::string::size_type precision=17) |
std::string | asString (const long double x, const std::string::size_type precision=21) |
std::string | asString (const NavID &p) |
std::string | asString (const ObsID &id) |
convert this object to a string representation More... | |
std::string | asString (const RinexObsID &p) |
std::string | asString (const SatID &p) |
SatID as a string. More... | |
template<class X > | |
std::string | asString (const X x) |
std::string | asString (CorrDupHandling e) noexcept |
Convert a CorrDupHandling to a whitespace-free string name. More... | |
std::string | asString (CorrectorType e) noexcept |
Convert a CorrectorType to a whitespace-free string name. More... | |
std::string | asString (DumpDetail e) noexcept |
Convert a DumpDetail to a whitespace-free string name. More... | |
std::string | asString (GalDataValid e) noexcept |
Convert a GalDataValid to a whitespace-free string name. More... | |
std::string | asString (GalHealthStatus e) noexcept |
Convert a GalHealthStatus to a whitespace-free string name. More... | |
std::string | asString (GLOCOrbitType e) |
std::string | asString (GLOCRegime e) |
std::string | asString (GLOCSatType e) |
std::string | asString (GLOFNavPCode e) |
Convert GLOFNavPCode to a printable string for dump(). More... | |
std::string | asString (GLOFNavSatType e) |
Convert SatType to a printable string for dump(). More... | |
std::string | asString (GPSLNavL2Codes e) |
Convert GPSLNavL2Codes to a printable string for dump(). More... | |
std::string | asString (IERSConvention e) |
Convert a IERSConvention enum to its string representation. More... | |
std::string | asString (IonexStoreStrategy e) |
Convert a IonexStoreStrategy to a whitespace-free string name. More... | |
std::string | asString (NavMessageType e) noexcept |
Convert a NavMessageType to a whitespace-free string name. More... | |
std::string | asString (NavSearchOrder e) |
Convert a NavSearchOrder to a whitespace-free string name. More... | |
std::string | asString (NavType e) noexcept |
Convert a NavType to a whitespace-free string name. More... | |
std::string | asString (NavValidityType e) noexcept |
Convert a NavValidityType to a whitespace-free string name. More... | |
std::string | asString (ObservationType e) noexcept |
Convert a ObservationType to a whitespace-free string name. More... | |
std::string | asString (ReferenceFrame e) |
Convert a ReferenceFrame enum to its string representation. More... | |
std::string | asString (RefFrameRlz e) noexcept |
Convert a RefFrameRlz to a whitespace-free string name. More... | |
std::string | asString (RefFrameSys e) noexcept |
Convert a RefFrameSys to a whitespace-free string name. More... | |
std::string | asString (SatelliteSystem e) noexcept |
Convert a SatelliteSystem to a whitespace-free string name. More... | |
std::string | asString (SVHealth e) noexcept |
Convert a SVHealth to a whitespace-free string name. More... | |
std::string | asString (TimeOffsetFilter e) noexcept |
Convert a TimeOffsetFilter to a whitespace-free string name. More... | |
std::string | asString (TimeSystem ts) |
Convert a TimeSystem enum to its string representation. More... | |
std::string | asString (TrackingCode e) noexcept |
Convert a TrackingCode to a whitespace-free string name. More... | |
std::string | asString (XmitAnt e) noexcept |
Convert a XmitAnt to a whitespace-free string name. More... | |
SVHealth | asSVHealth (const std::string &s) noexcept |
Convert a string name to an SVHealth. More... | |
TimeOffsetFilter | asTimeOffsetFilter (const std::string &s) noexcept |
Convert a string name to a TimeOffsetFilter. More... | |
TimeSystem | asTimeSystem (const std::string &s) |
Convert a string representation of TimeSystem to an enum. More... | |
TrackingCode | asTrackingCode (const std::string &s) noexcept |
Convert a string name to an TrackingCode. More... | |
unsigned long | asUnsigned (const std::string &s) |
XmitAnt | asXmitAnt (const std::string &s) noexcept |
Convert a string name to an XmitAnt. More... | |
std::string | c2x (const std::string &s) |
std::string & | c2x (std::string &s) |
std::string | center (const std::string &s, const std::string::size_type length, const char pad=' ') |
std::string & | center (std::string &s, const std::string::size_type length, const char pad=' ') |
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())) |
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)()) |
std::string | d2x (const std::string &s) |
std::string & | d2x (std::string &s) |
std::string | doub2for (const double &d, const std::string::size_type length, const std::string::size_type expLen, const bool checkSwitch=true) |
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) |
std::string | doubleToScientific (const double &d, const std::string::size_type length, const std::string::size_type precision, const std::string::size_type explen, bool showPlus=false) |
std::string | firstWord (const std::string &s, const char delimiter=' ') |
std::string | floatFormat (double d, FFLead lead, unsigned mantissa, unsigned exponent, unsigned width, char expChar, FFSign sign, FFAlign align) |
double | for2doub (const std::string &aStr, const std::string::size_type startPos=0, const std::string::size_type length=std::string::npos) |
template<class T > | |
std::string | formattedPrint (const std::string &fmt, const std::string &pat, const std::string &rep, T to) |
void | hexDumpData (const std::string &data, std::ostream &s, const HexDumpDataConfig &cfg) |
void | hexDumpData (std::ostream &s, const std::string &data, const std::string &tag, HexDumpDataConfig cfg=HexDumpDataConfig()) |
void | hexDumpData (std::ostream &s, const std::string &data, unsigned indent=0, const HexDumpDataConfig &cfg=HexDumpDataConfig()) |
std::string | int2x (const unsigned int &i) |
bool | isAlphaString (const std::string &s) |
bool | isDecimalString (const std::string &s) |
bool | isDigitString (const std::string &s) |
bool | isLike (const std::string &s, const char *pPattern, const char zeroOrMore=' *', const char oneOrMore='+', const char anyChar='.') |
bool | isLike (const std::string &s, const std::string &aPattern, const char zeroOrMore=' *', const char oneOrMore='+', const char anyChar='.') |
bool | isScientificString (const std::string &s) |
std::string | leftJustify (const std::string &s, const std::string::size_type length, const char pad=' ') |
std::string & | leftJustify (std::string &s, const std::string::size_type length, const char pad=' ') |
std::string | lowerCase (const std::string &s) |
std::string & | lowerCase (std::string &s) |
std::string | matches (const std::string &s, const std::string &aPattern, const char zeroOrMore=' *', const char oneOrMore='+', const char anyChar='.') |
std::string | memToString (const void *p, const std::string::size_type size) |
NEW_EXCEPTION_CLASS (StringException, Exception) | |
int | numWords (const std::string &s, const char delimiter=' ') |
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=' ') |
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=' ') |
std::string | printable (const std::string &aStr) |
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=' ') |
std::string & | replaceAll (std::string &s, const std::string &oldString, const std::string &newString) |
std::string | rightJustify (const std::string &s, const std::string::size_type length, const char pad=' ') |
std::string & | rightJustify (std::string &s, const std::string::size_type length, const char pad=' ') |
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) |
std::vector< std::string > | split (const std::string &aStr, const std::string &theDelimiters, bool trimWhitespace=false, bool ignoreEmpty=true) |
std::vector< std::string > | split (const std::string &str, const char delimiter=' ') |
std::vector< std::string > | splitWithDoubleQuotes (const std::string &aStr, const char delimiter=' ', bool trimWhitespace=true, bool ignoreEmpty=true) |
std::vector< std::string > | splitWithQuotes (const std::string &aStr, const char delimiter=' ', bool trimWhitespace=true, bool ignoreEmpty=true) |
std::string | strip (const std::string &s, const char *pString, std::string::size_type num=std::string::npos) |
std::string | strip (const std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) |
std::string | strip (const std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) |
std::string | strip (const std::string &s, std::string::size_type num=std::string::npos) |
std::string & | strip (std::string &s, const char *pString, std::string::size_type num=std::string::npos) |
std::string & | strip (std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) |
std::string & | strip (std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) |
std::string & | strip (std::string &s, std::string::size_type num=std::string::npos) |
std::string | stripFirstWord (std::string &s, const char delimiter=' ') |
std::string | stripLeading (const std::string &s, const char *pString, std::string::size_type num=std::string::npos) |
std::string | stripLeading (const std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) |
std::string | stripLeading (const std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) |
std::string | stripLeading (const std::string &s, std::string::size_type num=std::string::npos) |
std::string & | stripLeading (std::string &s, const char *pString, std::string::size_type num=std::string::npos) |
std::string & | stripLeading (std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) |
std::string & | stripLeading (std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) |
std::string & | stripLeading (std::string &s, std::string::size_type num=std::string::npos) |
std::string | stripTrailing (const std::string &s, const char *pString, std::string::size_type num=std::string::npos) |
std::string | stripTrailing (const std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) |
std::string | stripTrailing (const std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) |
std::string | stripTrailing (const std::string &s, std::string::size_type num=std::string::npos) |
std::string & | stripTrailing (std::string &s, const char *pString, std::string::size_type num=std::string::npos) |
std::string & | stripTrailing (std::string &s, const char aCharacter, std::string::size_type num=std::string::npos) |
std::string & | stripTrailing (std::string &s, const std::string &aString, std::string::size_type num=std::string::npos) |
std::string & | stripTrailing (std::string &s, std::string::size_type num=std::string::npos) |
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=' ') |
std::string | tabularize (const std::vector< std::string > &cells, std::string::size_type width=80, bool force=false) |
std::string | translate (const std::string &aString, const std::string &inputChars, const std::string &outputChars, const char pad=' ') |
std::string | upperCase (const std::string &s) |
std::string & | upperCase (std::string &s) |
std::string | word (const std::string &s, const std::string::size_type wordNum=0, const char delimiter=' ') |
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=' ') |
std::string | x2d (const std::string &s) |
std::string & | x2d (std::string &s) |
unsigned int | x2uint (const std::string &s) |
|
strong |
Alignment of data for floatFormat()
Enumerator | |
---|---|
Left | Formatted output will be left-aligned. |
Right | Formatted output will be right-aligned. |
Definition at line 125 of file StringUtils.hpp.
|
strong |
Leading character for floatFormat(), after any whitespace or sign.
Enumerator | |
---|---|
Zero | Start with zero, e.g. 0.12345. |
Decimal | Start with decimal, e.g. .12345. |
NonZero | Start with the first non-zero digit, e.g. 1.2345. |
Definition at line 109 of file StringUtils.hpp.
|
strong |
How to handle sign in floatFormat()
Enumerator | |
---|---|
NegOnly | Prefix output with a minus sign (neg) or nothing (pos) |
NegSpace | Prefix output with a minus sign (neg) or space (pos) |
NegPos | Prefix output with a minus sign (neg) or plus sign (pos) |
Definition at line 117 of file StringUtils.hpp.
Convert a string name to an AngleType.
Definition at line 61 of file AngleType.cpp.
|
noexcept |
Convert a string name to an CarrierBand.
Definition at line 80 of file CarrierBand.cpp.
|
noexcept |
Convert a string name to an CorrDupHandling.
Definition at line 58 of file CorrDupHandling.cpp.
|
noexcept |
Convert a string name to an CorrectorType.
Definition at line 60 of file CorrectorType.cpp.
|
inline |
Convert a value in a string to a type specified by the template class. The template class type must have stream operators defined.
s | object to turn into the templatized type. |
StringException |
Definition at line 1669 of file StringUtils.hpp.
|
inline |
Convert a string to a double precision floating point number.
s | string containing a number. |
Definition at line 705 of file StringUtils.hpp.
|
noexcept |
Convert a string name to an DumpDetail.
Definition at line 59 of file DumpDetail.cpp.
|
inline |
Convert a string to a single precision floating point number.
s | string containing a number. |
StringException |
Definition at line 1636 of file StringUtils.hpp.
|
noexcept |
Convert a string name to an GalDataValid.
Definition at line 57 of file GalDataValid.cpp.
|
noexcept |
Convert a string name to an GalHealthStatus.
Definition at line 59 of file GalHealthStatus.cpp.
IERSConvention gnsstk::StringUtils::asIERSConvention | ( | const std::string & | s | ) |
Convert a string representation of IERSConvention to an enum.
Definition at line 67 of file IERSConvention.cpp.
|
inline |
Convert a string to an integer.
s | string containing a number. |
Definition at line 713 of file StringUtils.hpp.
IonexStoreStrategy gnsstk::StringUtils::asIonexStoreStrategy | ( | const std::string & | s | ) |
Convert a string name to an IonexStoreStrategy.
Definition at line 60 of file IonexStoreStrategy.cpp.
|
inline |
Convert a string to a big precision floating point number.
s | string containing a number. |
StringException |
Definition at line 1652 of file StringUtils.hpp.
|
noexcept |
Convert a string name to an NavMessageType.
Definition at line 62 of file NavMessageType.cpp.
NavSearchOrder gnsstk::StringUtils::asNavSearchOrder | ( | const std::string & | s | ) |
Convert a string name to an NavSearchOrder.
Definition at line 58 of file NavSearchOrder.cpp.
Convert a string name to an NavType.
Definition at line 75 of file NavType.cpp.
|
noexcept |
Convert a string name to an NavValidityType.
Definition at line 58 of file NavValidityType.cpp.
|
noexcept |
Convert a string name to an ObservationType.
Definition at line 78 of file ObservationType.cpp.
ReferenceFrame gnsstk::StringUtils::asReferenceFrame | ( | const std::string & | s | ) |
Convert a string representation of ReferenceFrame to an enum.
Definition at line 74 of file ReferenceFrame.cpp.
|
noexcept |
Convert a string name to an RefFrameRlz.
Definition at line 210 of file RefFrameRlz.cpp.
|
noexcept |
Convert a string name to an RefFrameSys.
Definition at line 62 of file RefFrameSys.cpp.
|
noexcept |
Convert a string name to an SatelliteSystem.
Definition at line 73 of file SatelliteSystem.cpp.
|
noexcept |
Convert a AngleType to a whitespace-free string name.
Definition at line 46 of file AngleType.cpp.
|
noexcept |
Convert a CarrierBand to a whitespace-free string name.
Definition at line 52 of file CarrierBand.cpp.
|
inline |
Convert a double to a string in fixed notation.
x | double. |
precision | the number of decimal places you want displayed. |
Definition at line 1692 of file StringUtils.hpp.
|
inline |
Convert a long double to a string in fixed notation.
x | long double. |
precision | the number of decimal places you want displayed. |
Definition at line 1685 of file StringUtils.hpp.
std::string gnsstk::StringUtils::asString | ( | const RinexObsID & | p | ) |
Definition at line 183 of file RinexObsID.cpp.
|
inline |
Convert any old object to a string. The class must have stream operators defined.
x | object to turn into a string. |
Definition at line 1700 of file StringUtils.hpp.
|
noexcept |
Convert a CorrDupHandling to a whitespace-free string name.
Definition at line 45 of file CorrDupHandling.cpp.
|
noexcept |
Convert a CorrectorType to a whitespace-free string name.
Definition at line 45 of file CorrectorType.cpp.
|
noexcept |
Convert a DumpDetail to a whitespace-free string name.
Definition at line 45 of file DumpDetail.cpp.
|
noexcept |
Convert a GalDataValid to a whitespace-free string name.
Definition at line 45 of file GalDataValid.cpp.
|
noexcept |
Convert a GalHealthStatus to a whitespace-free string name.
Definition at line 45 of file GalHealthStatus.cpp.
std::string gnsstk::StringUtils::asString | ( | GLOCOrbitType | e | ) |
Definition at line 46 of file GLOCOrbitType.cpp.
std::string gnsstk::StringUtils::asString | ( | GLOCRegime | e | ) |
Definition at line 46 of file GLOCRegime.cpp.
std::string gnsstk::StringUtils::asString | ( | GLOCSatType | e | ) |
Definition at line 46 of file GLOCSatType.cpp.
std::string gnsstk::StringUtils::asString | ( | GLOFNavPCode | e | ) |
Convert GLOFNavPCode to a printable string for dump().
Definition at line 47 of file GLOFNavPCode.cpp.
std::string gnsstk::StringUtils::asString | ( | GLOFNavSatType | e | ) |
Convert SatType to a printable string for dump().
Definition at line 47 of file GLOFNavSatType.cpp.
std::string gnsstk::StringUtils::asString | ( | GPSLNavL2Codes | e | ) |
Convert GPSLNavL2Codes to a printable string for dump().
Definition at line 47 of file GPSLNavL2Codes.cpp.
std::string gnsstk::StringUtils::asString | ( | IERSConvention | e | ) |
Convert a IERSConvention enum to its string representation.
Definition at line 50 of file IERSConvention.cpp.
std::string gnsstk::StringUtils::asString | ( | IonexStoreStrategy | e | ) |
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition at line 46 of file IonexStoreStrategy.cpp.
|
noexcept |
Convert a NavMessageType to a whitespace-free string name.
Definition at line 45 of file NavMessageType.cpp.
std::string gnsstk::StringUtils::asString | ( | NavSearchOrder | e | ) |
Convert a NavSearchOrder to a whitespace-free string name.
Definition at line 46 of file NavSearchOrder.cpp.
|
noexcept |
Convert a NavType to a whitespace-free string name.
Definition at line 52 of file NavType.cpp.
|
noexcept |
Convert a NavValidityType to a whitespace-free string name.
Definition at line 45 of file NavValidityType.cpp.
|
noexcept |
Convert a ObservationType to a whitespace-free string name.
Definition at line 52 of file ObservationType.cpp.
std::string gnsstk::StringUtils::asString | ( | ReferenceFrame | e | ) |
Convert a ReferenceFrame enum to its string representation.
Definition at line 47 of file ReferenceFrame.cpp.
|
noexcept |
Convert a RefFrameRlz to a whitespace-free string name.
Definition at line 181 of file RefFrameRlz.cpp.
|
noexcept |
Convert a RefFrameSys to a whitespace-free string name.
Definition at line 47 of file RefFrameSys.cpp.
|
noexcept |
Convert a SatelliteSystem to a whitespace-free string name.
Definition at line 52 of file SatelliteSystem.cpp.
|
noexcept |
Convert a SVHealth to a whitespace-free string name.
Definition at line 70 of file SVHealth.cpp.
|
noexcept |
Convert a TimeOffsetFilter to a whitespace-free string name.
Definition at line 46 of file TimeOffsetFilter.cpp.
std::string gnsstk::StringUtils::asString | ( | TimeSystem | ts | ) |
Convert a TimeSystem enum to its string representation.
Definition at line 303 of file TimeSystem.cpp.
|
noexcept |
Convert a TrackingCode to a whitespace-free string name.
Definition at line 52 of file TrackingCode.cpp.
|
noexcept |
Convert a XmitAnt to a whitespace-free string name.
Definition at line 45 of file XmitAnt.cpp.
Convert a string name to an SVHealth.
Definition at line 84 of file SVHealth.cpp.
|
noexcept |
Convert a string name to a TimeOffsetFilter.
Definition at line 59 of file TimeOffsetFilter.cpp.
TimeSystem gnsstk::StringUtils::asTimeSystem | ( | const std::string & | s | ) |
Convert a string representation of TimeSystem to an enum.
Definition at line 324 of file TimeSystem.cpp.
|
noexcept |
Convert a string name to an TrackingCode.
Definition at line 182 of file TrackingCode.cpp.
|
inline |
Convert a string to an unsigned integer.
s | string containing a number. |
Definition at line 721 of file StringUtils.hpp.
Convert a string name to an XmitAnt.
Definition at line 58 of file XmitAnt.cpp.
|
inline |
Convert a character string to a hexadecimal string.
s | string containing an integer. |
StringException |
Definition at line 842 of file StringUtils.hpp.
|
inline |
Convert a character string to a hexadecimal string. Modify the string such that the character string is now represented as series of hexadecimal digits.
s | string to convert. |
StringException |
Definition at line 1740 of file StringUtils.hpp.
|
inline |
Change the length of a string by adding to the beginning and end (const version). The string s is modified to the specified length. If the string is shorter than length, then the string is truncated with the left-most length characters remaining. Otherwise, characters are added to the beginning and end of the string until the string is the specified length, where the number of characters added to the beginning and the end does not differ by more than one so the original string is centered.
s | string to be modified. |
length | new desired length of string. |
pad | character to pad string with (blank by default). |
StringException | if there's a std::exception thrown. |
Definition at line 695 of file StringUtils.hpp.
|
inline |
Change the length of a string by adding to the beginning and end. The string s is modified to the specified length. If the string is shorter than length, then the string is truncated with the left-most length characters remaining. Otherwise, characters are added to the beginning and end of the string until the string is the specified length, where the number of characters added to the beginning and the end does not differ by more than one so the original string is centered.
s | string to be modified. |
length | new desired length of string. |
pad | character to pad string with (blank by default). |
StringException | if there's a std::exception thrown. |
Definition at line 1607 of file StringUtils.hpp.
|
inline |
Changes occurrences of a specified pattern to a specified replacement string. You can specify the number of changes to perform. The default is to change all occurrences of the pattern. You can also specify the position in the receiver at which to begin.
aString | string to perform translation on. |
inputString | The pattern string as a reference to an object of type string. The library searches for the pattern string within the receiver's data. |
outputString | The replacement string as a reference to an object of type string. It replaces the occurrences of the pattern string in the receiver's data. |
startPos | The position to start the search at within the receiver's data. The default is 0. |
numChanges | the number of patterns to search for and change. The default is to change all occurrences of the pattern. |
Definition at line 1521 of file StringUtils.hpp.
|
inline |
Changes occurrences of a specified pattern to a specified replacement string. You can specify the number of changes to perform. The default is to change all occurrences of the pattern. You can also specify the position in the receiver at which to begin.
aString | string to perform translation on. |
inputString | The pattern string as a reference to an object of type string. The library searches for the pattern string within the receiver's data. |
outputString | The replacement string as a reference to an object of type string. It replaces the occurrences of the pattern string in the receiver's data. |
startPos | The position to start the search at within the receiver's data. The default is 0. |
numChanges | the number of patterns to search for and change. The default is to change all occurrences of the pattern. |
Definition at line 1531 of file StringUtils.hpp.
|
inline |
Convert a decimal string to a hexadecimal string. Given a string containing a decimal integer, convert the integer from base 10 to base 16 and return the result. No prefix is added. Only the first decimal encountered is changed; the rest of the string is unmodified.
s | string containing an integer. |
StringException |
Definition at line 799 of file StringUtils.hpp.
|
inline |
Convert a decimal string to a hexadecimal string. Modify the string such that the decimal integer is now represented as hexadecimal. Only the first decimal encountered is changed; the rest of the string is unmodified.
s | string containing an integer. |
StringException |
Definition at line 1708 of file StringUtils.hpp.
|
inline |
Convert double precision floating point to a string containing the number in FORTRAN notation. As an example, the number 156360 becomes ".15636D6".
d | number to convert. |
length | length (in characters) of number, including exponent. |
expLen | length (in characters of exponent, including sign. |
checkSwitch | if true, keeps the exponential sanity check for exponentials above three characters in length. If false, it removes that check. |
StringException |
Definition at line 2668 of file StringUtils.hpp.
|
inline |
Convert a double to a scientific notation number.
d | the double to convert |
length | length (in characters) of output, including exponent |
expLen | length (in characters) of the exponent, with sign |
showSign | if true, reserves 1 character for +/- sign |
checkSwitch | if true, keeps the exponential sanity check for exponentials above three characters in length. If false, it removes that check. |
Definition at line 2491 of file StringUtils.hpp.
|
inline |
Convert a double to scientific notation; this routine works better, on Windows particularly, than doub2sci.
length | = total string length, including 1 for overall sign if showPlus is true. |
precision | = number of digits after the decimal and before the 'e' |
explen | = length of exponent, this must = 1, 2 or 3 NB. length is increased if precision, explen and showPlus require it. |
Definition at line 2525 of file StringUtils.hpp.
|
inline |
Returns the first word in string s without modifying the string.
s | the string to count the words from. |
delimiter | the character that marks the start and end of a word. |
StringException |
Definition at line 2138 of file StringUtils.hpp.
std::string gnsstk::StringUtils::floatFormat | ( | double | d, |
FFLead | lead, | ||
unsigned | mantissa, | ||
unsigned | exponent, | ||
unsigned | width = 0 , |
||
char | expChar = 'e' , |
||
FFSign | sign = FFSign::NegOnly , |
||
FFAlign | align = FFAlign::Left |
||
) |
Format a floating point value according to rules not directly supported by C++ stream I/O.
[in] | d | The value that is to be formatted in an ostream. |
[in] | lead | How the lead-in to the value is to be formatted. |
[in] | mantissa | How many digits of precision should be in the mantissa, e.g. mantissa=5 could result in something like 1.2345e+00. |
[in] | exponent | How many digits of precision should be in the exponent, e.g. exponent=3 could result in something like 1.2345e+000. Exponents will always be at least 2 characters in length. |
[in] | width | The total number of characters in the formatted value. If the length of the formatted value including mantissa, exponent, sign, etc. is >= width, no additional formatting will take place. If the length of the formatted value is < width, it will be padded with spaces according to align. |
[in] | expChar | The character used to designate the exponent, e.g. "e" or "E" or "D". |
[in] | sign | How numerical sign is to be handled in formatting. |
[in] | align | How to pad the formatted value according to width. Left adds space to the end of the formatted value while Right inserts space at the beginning. |
Definition at line 210 of file StringUtils.cpp.
|
inline |
Convert FORTRAN representation of a double precision floating point in a string to a number. As an example, the number ".15636D6" becomes 156360.
aStr | string containing FORTRAN representation of number. |
startPos | beginning of number in string. |
length | length (in characters) of number, including exponent. |
Definition at line 2698 of file StringUtils.hpp.
|
inline |
Work-horse method for printf. Substitutes patterns matching pat with rep. Use only one pattern/token at a time! This used to be DayTime::iprint().
fmt | format to use for this time. |
pat | regular expression pattern to match. |
rep | sprintf token replacement. First character is token character used in fmt, remainder is sprintf token to use. For example, with fmt="%15S", pat="%[ 0-]?[[:digit:]]*S", and rep="Sd", the fmt will be translated to "%15d" before using it in a sprintf call like printf("%15d"), to. |
to | the value to stuff into the string. |
StringException |
Definition at line 2020 of file StringUtils.hpp.
void gnsstk::StringUtils::hexDumpData | ( | const std::string & | data, |
std::ostream & | s, | ||
const HexDumpDataConfig & | cfg = HexDumpDataConfig() |
||
) |
Perform a formatted hex-dump of the (potentially) binary data to the given stream.
[in] | data | data to hex-dump. |
[in,out] | s | stream to dump data to. |
[in] | cfg | formatting configuration. |
Definition at line 62 of file StringUtils.cpp.
|
inline |
Perform a formatted hex-dump of the (potentially) binary data to the given stream.
s | stream to dump data to. |
data | data to hex-dump. |
tag | string to put at the beginning of each line of output. |
cfg | formatting configuration. |
Definition at line 1416 of file StringUtils.hpp.
|
inline |
Perform a formatted hex-dump of the (potentially) binary data to the given stream.
s | stream to dump data to. |
data | data to hex-dump. |
indent | indents the string by that many spaces. |
cfg | formatting configuration. |
Definition at line 1409 of file StringUtils.hpp.
|
inline |
Convert an int to a string.
i | the integer to convert |
StringException |
Definition at line 1830 of file StringUtils.hpp.
|
inline |
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.
s | the string to check the characters in. |
Definition at line 1922 of file StringUtils.hpp.
|
inline |
isDecimalString is like isDigitString() except it allows a single period ('.') character in the string.
s | the string to check. |
Definition at line 1885 of file StringUtils.hpp.
|
inline |
isDigitString is exactly like the C function isDigit except it checks all the characters of string s to see if they are all digits.
s | the string to check the digits in. |
Definition at line 1871 of file StringUtils.hpp.
|
inline |
Perform pattern matching on strings. Looks for a pattern in a string. Wildcards are allowed. Uses POSIX regular expressions.
s | string to search. |
pPattern | pattern to search for. This is a POSIX regular expression. |
zeroOrMore | character representing wildcards matching strings of zero or more characters (default '*'). |
oneOrMore | character representing plus sign matching strings of one or more characters (default '+'). |
anyChar | character representing wildcards matching a single arbitrary character (default '.'). |
StringException |
Definition at line 973 of file StringUtils.hpp.
|
inline |
Perform pattern matching on strings. Looks for a pattern in a string. Wildcards are allowed. Uses POSIX regular expressions.
s | string to search. |
aPattern | pattern to search for. This is a POSIX regular expression. |
zeroOrMore | character representing wildcards matching strings of zero or more characters (default '*'). |
oneOrMore | character representing plus sign matching strings of one or more characters (default '+'). |
anyChar | character representing wildcards matching a single arbitrary character (default '.'). |
StringException |
Definition at line 948 of file StringUtils.hpp.
|
inline |
isScientificString extends isDecimalString() to allow a single exponent (E,e,D,d) character between a decimal string and a (possibly empty) digit string.
s | the string to check. |
Definition at line 1908 of file StringUtils.hpp.
|
inline |
Left-justifies the receiver in a string of the specified length (const version). If the new length (length) is larger than the current length, the string is extended by the pad character (pad). The default pad character is a blank.
s | string to be modified. |
length | new desired length of string. |
pad | character to pad string with (blank by default). |
StringException | if there's a std::exception thrown. |
Definition at line 651 of file StringUtils.hpp.
|
inline |
Left-justifies the receiver in a string of the specified length. If the new length (length) is larger than the current length, the string is extended by the pad character (pad). The default pad character is a blank.
s | string to be modified. |
length | new desired length of string. |
pad | character to pad string with (blank by default). |
StringException | if there's a std::exception thrown. |
Definition at line 1582 of file StringUtils.hpp.
|
inline |
Change all upper-case letters in a string to lower-case. Does not modify the original string.
s | a string containing upper-case characters. |
Definition at line 1029 of file StringUtils.hpp.
|
inline |
Change all upper-case letters in a string to lower-case. s is modified as a result.
s | string to change to lower case. |
Definition at line 2108 of file StringUtils.hpp.
|
inline |
Perform pattern matching on strings. Looks for a pattern in a string. Wildcards are allowed. Uses POSIX regular expressions.
s | string to search. |
aPattern | pattern to search for. This is a POSIX regular expression. |
zeroOrMore | character representing wildcards matching strings of zero or more characters (default '*'). |
oneOrMore | character representing plus sign matching strings of one or more characters (default '+'). |
anyChar | character representing wildcards matching a single arbitrary character (default '.'). |
StringException |
Definition at line 1934 of file StringUtils.hpp.
|
inline |
Make a string from a void pointer. This function should not be used. Instead, use the string constructor as follows:
p | pointer to memory. |
size | length of the data to turn into a string. |
Definition at line 2126 of file StringUtils.hpp.
Counts the number of words in s and returns it.
s | the string to count the words from. |
delimiter | the character that marks the start and end of a word. |
StringException |
Definition at line 2171 of file StringUtils.hpp.
|
inline |
Const version of prettyPrint, which nicely expands the input string into several lines.
aStr | the string to be modified. |
lineDelim | a string to put between every line. |
indent | an indentataion string used on all but the first line |
firstIndent | is the indentation used on the first line. |
len | the maximum length of string to put on a line. |
wordDelim | the character that separates each word. |
StringException |
Definition at line 1335 of file StringUtils.hpp.
|
inline |
Nicely expands the input string into several lines, non-const version.
aStr | the string to be modified. |
lineDelim | a string to put between every line. |
indent | an indentataion string used on all but the first line |
firstIndent | is the indentation used on the first line. |
len | the maximum length of string to put on a line. |
wordDelim | the character that separates each word. |
StringException |
Definition at line 2774 of file StringUtils.hpp.
|
inline |
Change a string into printable characters. Control characters 0, 1, ... 31 are changed to ^@, ^A, ... ^_ ; control character 127 is changed to ^? (as per Caret-notation). Other non-printable characters are changed to hex sequences enclosed in <>.
aStr | the string to make printable. |
StringException |
Definition at line 2731 of file StringUtils.hpp.
|
inline |
Remove indicated words from the string s. s is modified as a result. Removal of a word begins at the start of the word and continues to include any delimiters between the end of the word and the start of the next word. If the last word in s is removed, all trailing delimiters are removed as well; if all words in s are removed, the resulting string is empty.
s | a string with words to be removed. |
first | the first word to be removed (the first word is 0). |
wordsToReplace | the number of words to remove, or std::string::npos to remove all subsequent words |
delimiter | character that marks the start and end of words |
StringException |
Definition at line 2429 of file StringUtils.hpp.
|
inline |
Replace all instances of oldString with newString in s.
s | the string whose contents will be modified. |
oldString | the string to search for in s. |
newString | the string to replace oldString in s. |
StringException |
Definition at line 1849 of file StringUtils.hpp.
|
inline |
Right-justifies the receiver in a string of the specified length (const version). If the receiver's data is shorter than the requested length (length), it is padded on the left with the pad character (pad). The default pad character is a blank.
s | string to be modified. |
length | new desired length of string. |
pad | character to pad string with (blank by default). |
StringException | if there's a std::exception thrown. |
Definition at line 620 of file StringUtils.hpp.
|
inline |
Right-justifies the receiver in a string of the specified length. If the receiver's data is shorter than the requested length (length), it is padded on the left with the pad character (pad). The default pad character is a blank.
s | string to be modified. |
length | new desired length of string. |
pad | character to pad string with (blank by default). |
StringException | if there's a std::exception thrown. |
Definition at line 1557 of file StringUtils.hpp.
|
inline |
Convert scientific notation to FORTRAN notation. As an example, the string "1.5636E5" becomes " .15636D6". Note that the first character of the string will be '-' if the number is negative or ' ' if the first character is positive.
aStr | string with number to convert |
startPos | start position of number in string |
length | length (in characters) of number, including exponent. |
expLen | length (in characters of exponent, not including sign. |
checkSwitch | will keep the method running as originally programmed when set to true. If false, the method will always resize exponentials, produce an exponential with an E instead of a D, and always have a leading zero. For example -> 0.87654E-0004 or -0.1234E00005. |
StringException | if the string is not a number in scientific notation |
Definition at line 2566 of file StringUtils.hpp.
|
inline |
Split a string by some delimiters
aStr | the string to be split |
theDelimiters | the delimiters to split the string |
trimWhitespace | will trim the token string, default is false |
ignoreEmpty | will ignore the empty tokens, default is true |
Definition at line 2297 of file StringUtils.hpp.
|
inline |
Split a string str into words as defined by delimiter.
str | string to be parsed. |
delimiter | character that marks the start and end of a word. |
StringException |
Definition at line 2275 of file StringUtils.hpp.
|
inline |
Split a string on the given delimiter, respecting fields enclosed by a pair of double quotes. Quotes are removed in output, and optionally also leading and trailing whitespace.
aStr | the string to be split |
delimiter | character delimiter (not ") |
trimWhitespace | will trim the token string, default is true |
ignoreEmpty | will ignore the empty tokens, default is true |
Definition at line 2376 of file StringUtils.hpp.
|
inline |
Split a string on the given delimiter, respecting fields enclosed by a pair of either single or double quotes. Quotes are removed in output, and optionally also leading and trailing whitespace.
aStr | the string to be split |
delimiter | character delimiter (not ' or ") |
trimWhitespace | will trim the token string, default is true |
ignoreEmpty | will ignore the empty tokens, default is true |
Definition at line 2322 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning and end of another string cosnt version. Occurrences of the string pString appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
pString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 467 of file StringUtils.hpp.
|
inline |
Strip character(s) from the beginning and end of a string const version. Occurrences of the character aCharacter appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
aCharacter | character to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 497 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning and end of another string const version. Occurrences of the string aString appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
aString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 436 of file StringUtils.hpp.
|
inline |
Strip blanks from the beginning and end of a string const version. Occurrences of the space character appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 524 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning and end of another string. Occurrences of the string pString appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
pString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 452 of file StringUtils.hpp.
|
inline |
Strip character(s) from the beginning and end of a string. Occurrences of the character aCharacter appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
aCharacter | character to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 482 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning and end of another string. Occurrences of the string aString appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
aString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 1482 of file StringUtils.hpp.
|
inline |
Strip blanks from the beginning and end of a string. Occurrences of the space character appearing at the beginning and end of the string s are removed.
s | string to be stripped (modified). |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 511 of file StringUtils.hpp.
|
inline |
Removes the first word off string s and returns it. s is modified as a result.
s | a string with the word you want removed. |
delimiter | the character that marks the start and end of a word. |
StringException |
Definition at line 2253 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning of another string const version. Occurrences of the string pString appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
pString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 235 of file StringUtils.hpp.
|
inline |
Strip character(s) from the beginning of a string const version. Occurrences of the character aCharacter appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
aCharacter | character to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 265 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning of another string const version. Occurrences of the string aString appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
aString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 205 of file StringUtils.hpp.
|
inline |
Strip blanks from the beginning of a string const version. Occurrences of the space character appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 292 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning of another string. Occurrences of the string pString appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
pString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 220 of file StringUtils.hpp.
|
inline |
Strip character(s) from the beginning of a string. Occurrences of the character aCharacter appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
aCharacter | character to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 250 of file StringUtils.hpp.
|
inline |
Remove a string from the beginning of another string. Occurrences of the string aString appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
aString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 1426 of file StringUtils.hpp.
|
inline |
Strip blanks from the beginning of a string. Occurrences of the space character appearing at the beginning of the string s are removed.
s | string to be stripped (modified). |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 279 of file StringUtils.hpp.
|
inline |
Remove a string from the end of another string const version. Occurrences of the string pString appearing at the end of the string s are removed.
s | string to be stripped (modified). |
pString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 350 of file StringUtils.hpp.
|
inline |
Strip character(s) from the end of a string const version. Occurrences of the character aCharacter appearing at the end of the string s are removed.
s | string to be stripped (modified). |
aCharacter | character to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 380 of file StringUtils.hpp.
|
inline |
Remove a string from the end of another string const version. Occurrences of the string aString appearing at the end of the string s are removed.
s | string to be stripped (modified). |
aString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 320 of file StringUtils.hpp.
|
inline |
Strip blanks from the end of a string const version. Occurrences of the space character appearing at the end of the string s are removed.
s | string to be stripped (modified). |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 407 of file StringUtils.hpp.
|
inline |
Remove a string from the end of another string. Occurrences of the string pString appearing at the end of the string s are removed.
s | string to be stripped (modified). |
pString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 335 of file StringUtils.hpp.
|
inline |
Strip character(s) from the end of a string. Occurrences of the character aCharacter appearing at the end of the string s are removed.
s | string to be stripped (modified). |
aCharacter | character to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 365 of file StringUtils.hpp.
|
inline |
Remove a string from the end of another string. Occurrences of the string aString appearing at the end of the string s are removed.
s | string to be stripped (modified). |
aString | string to remove. |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 1453 of file StringUtils.hpp.
|
inline |
Strip blanks from the end of a string. Occurrences of the space character appearing at the end of the string s are removed.
s | string to be stripped (modified). |
num | maximum number of occurrences to remove. |
StringException | if there's a std::exception thrown. |
Definition at line 394 of file StringUtils.hpp.
|
inline |
Get a substring of a string. Try to avoid using this, use the stl string's substr method instead (and leftJustify if needed).
StringException |
Definition at line 2083 of file StringUtils.hpp.
|
inline |
Create a table in text consisting of cells organized in row-major order. Output is space separated, and columns widths are adjusted to accomodate the maximum size of the cells.
[in] | cells | The table cells to format. |
[in] | width | The maximum number of characters per row. |
[in] | force | If true, width is always used to govern the table width, otherwise an attempt is made to determine the console width to use instead (falling back on width). |
Definition at line 2835 of file StringUtils.hpp.
|
inline |
Converts all of the receiver's characters that are in the first specified string to the corresponding character in the second specified string.
aString | string to perform translation on. |
inputChars | characters in aString to translate from. |
outputChars | characters to translate to. |
pad | pad character in the event inputChars and outputChars are not equal length. The pad character will become the translated character. |
Definition at line 1491 of file StringUtils.hpp.
|
inline |
Change all lower-case letters in a string to upper-case. Does not modify the original string.
s | a string containing lower-case characters. |
Definition at line 1046 of file StringUtils.hpp.
|
inline |
Change all lower-case letters in a string to upper-case. s is modified as a result.
s | string to change to upper case. |
Definition at line 2117 of file StringUtils.hpp.
|
inline |
Returns word number wordNum from s (if any).
s | a string with the word you want removed. |
wordNum | the number of the word you want from s. The first word is word 0. |
delimiter | the character that marks the start and end of a word. |
StringException |
Definition at line 1112 of file StringUtils.hpp.
|
inline |
Returns numWords words starting with firstWord from s (if any).
s | a string with the word you want removed. |
firstWord | the number of the first word you want from s. The first word is word 0. |
numWords | number of words to get from s. |
delimiter | the character that marks the start and end of a word. |
StringException |
Definition at line 2199 of file StringUtils.hpp.
|
inline |
Convert a hexadecimal string to a decimal string. Given a string containing a hexadecimal number, convert the integer from base 16 to base 10 and return the result. Only the first hex number encountered is changed; the rest of the string is unmodified.
s | string containing an integer. |
StringException |
Definition at line 823 of file StringUtils.hpp.
|
inline |
Convert a hexadecimal string to a decimal string. Modify the string such that the hexadecimal number is now represented as decimal. Only the first hex number encountered is changed; the rest of the string is unmodified.
s | string containing an integer. |
StringException |
Definition at line 1797 of file StringUtils.hpp.
|
inline |
Convert a hexadecimal string to an unsigned int. Only the first hex number encountered is converted.
s | string containing a hex integer. |
StringException |
Definition at line 1773 of file StringUtils.hpp.