#include "CeylanException.h"
#include "CeylanDisplayable.h"
#include "CeylanTypes.h"
#include <string>
#include <list>
Go to the source code of this file.
Namespaces | |
namespace | Ceylan |
This part of the Ceylan namespace gathers some convenient string manipulation facilities to be widely used. | |
Functions | |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Sint8 i) |
This module offers the operators lacking in C++ in order to perform appending of numerical values to standard strings, and basic string conversion. | |
CEYLAN_DLL std::string | operator+ (Ceylan::Sint8 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Uint8 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Uint8 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Sint16 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Sint16 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Uint16 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Uint16 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Sint32 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Sint32 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Uint32 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Uint32 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::SignedLongInteger i) |
CEYLAN_DLL std::string | operator+ (Ceylan::SignedLongInteger i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::UnsignedLongInteger i) |
CEYLAN_DLL std::string | operator+ (Ceylan::UnsignedLongInteger i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Float32 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Float32 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::Float64 i) |
CEYLAN_DLL std::string | operator+ (Ceylan::Float64 i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, Ceylan::LongFloat i) |
CEYLAN_DLL std::string | operator+ (Ceylan::LongFloat i, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &s, const void *p) |
CEYLAN_DLL std::string | operator+ (const void *p, const std::string &s) |
CEYLAN_DLL std::string | operator+ (const std::string &a, const char *b) |
CEYLAN_DLL std::string | operator+ (const char *a, const std::string &b) |
CEYLAN_DLL std::string | Ceylan::toString (const void *pointer) |
Returns a user-friendly representation of a pointer. | |
CEYLAN_DLL std::string | Ceylan::toString (bool value) |
Returns a user-friendly textual representation of a bool ("true" or "false"). | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Sint8 value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Uint8 value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Sint16 value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Uint16 value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Sint32 value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Uint32 value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::UnsignedLongInteger value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::SignedLongInteger value, bool bitField=false) |
Converts the numerical value to a string. | |
CEYLAN_DLL std::string | Ceylan::toHexString (Ceylan::UnsignedLongInteger value, bool prefix=true, Ceylan::Uint8 minDigits=1) |
Converts the numerical value to a string with the value in hexadecimal format. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Float32 value, Ceylan::Uint8 precision=Ceylan::DigitOutputPrecision) |
Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::Float64 value, Ceylan::Uint8 precision=Ceylan::DigitOutputPrecision) |
Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::LongFloat value, Ceylan::Uint8 precision=Ceylan::DigitOutputPrecision) |
Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation. | |
CEYLAN_DLL std::string | Ceylan::toString (Ceylan::VerbosityLevels level) |
Converts a verbosity level into a string. | |
CEYLAN_DLL std::string | Ceylan::toString (const std::list< Ceylan::Uint32 > &intList) |
CEYLAN_DLL std::string | Ceylan::toString (const std::list< const void * > &pointerList) |
CEYLAN_DLL std::string | Ceylan::toNumericalString (Uint8 number) |
CEYLAN_DLL std::string | Ceylan::toString (char character) |
CEYLAN_DLL int | Ceylan::stringToUnsignedLong (const std::string &numericalString) |
This section focuses on conversion from standard strings to various numerical types. | |
CEYLAN_DLL void * | Ceylan::stringToAddress (const std::string &addressString) |
Converts, if possible, a string containing a pointer into that pointer. | |
Variables | |
CEYLAN_DLL const Ceylan::Uint16 | Ceylan::DigitOutputPrecision = 40 |
This section focuses on conversion from various numerical types to standard strings. | |
CEYLAN_DLL const std::string | Ceylan::HexDigits = "0123456789ABCDEF" |
The hexadecimal digits: 0123456789ABCDEF. |
CEYLAN_DLL std::string operator+ | ( | const char * | a, | |
const std::string & | b | |||
) |
Definition at line 736 of file CeylanOperators.cc.
CEYLAN_DLL std::string operator+ | ( | const std::string & | a, | |
const char * | b | |||
) |
Definition at line 727 of file CeylanOperators.cc.
CEYLAN_DLL std::string operator+ | ( | const void * | p, | |
const std::string & | s | |||
) |
Definition at line 702 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
const void * | p | |||
) |
Definition at line 677 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::LongFloat | i, | |
const std::string & | s | |||
) |
Definition at line 652 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::LongFloat | i | |||
) |
Definition at line 627 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Float64 | i, | |
const std::string & | s | |||
) |
Definition at line 597 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Float64 | i | |||
) |
Definition at line 572 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Float32 | i, | |
const std::string & | s | |||
) |
Definition at line 547 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Float32 | i | |||
) |
Definition at line 522 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::UnsignedLongInteger | i, | |
const std::string & | s | |||
) |
Definition at line 496 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::UnsignedLongInteger | i | |||
) |
Definition at line 471 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::SignedLongInteger | i, | |
const std::string & | s | |||
) |
Definition at line 446 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::SignedLongInteger | i | |||
) |
Definition at line 421 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Uint32 | i, | |
const std::string & | s | |||
) |
Definition at line 359 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Uint32 | i | |||
) |
Definition at line 334 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Sint32 | i, | |
const std::string & | s | |||
) |
Definition at line 309 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Sint32 | i | |||
) |
Definition at line 284 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Uint16 | i, | |
const std::string & | s | |||
) |
Definition at line 259 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Uint16 | i | |||
) |
Definition at line 234 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Sint16 | i, | |
const std::string & | s | |||
) |
Definition at line 209 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Sint16 | i | |||
) |
Definition at line 184 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Uint8 | i, | |
const std::string & | s | |||
) |
Definition at line 154 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const std::string & | s, | |
Ceylan::Uint8 | i | |||
) |
Definition at line 124 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | Ceylan::Sint8 | i, | |
const std::string & | s | |||
) |
Definition at line 94 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.
CEYLAN_DLL std::string operator+ | ( | const string & | s, | |
Ceylan::Sint8 | i | |||
) |
This module offers the operators lacking in C++ in order to perform appending of numerical values to standard strings, and basic string conversion.
Various conversions are provided, from numerical to string and the other way round.
Each operator has its counterpart, which allows to add a numerical value to a string in both orders: 'numerical + string' and also 'string + numerical'.
Warning: a C++ compiler evaluates '"Four means " + 4' as 'char *' + 'int' so it does pointer arithmetic and returns unexpected bytes: actually, it returns the 'char *' starting with the space before "means", 4 characters after the initial F.
Please consider using 'string( "Four means " ) + 4', which would result in the expected string "Four means 4".
Most operators can throw Ceylan::Exception.
This module offers the operators lacking in C++ in order to perform appending of numerical values to standard strings, and basic string conversion.
Definition at line 64 of file CeylanOperators.cc.
References Ceylan::DigitOutputPrecision.