libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
String.cpp File Reference
#include <osmscout/util/String.h>
#include <algorithm>
#include <cctype>
#include <cstring>
#include <cwchar>
#include <iomanip>
#include <locale>
#include <sstream>
#include <osmscout/system/Math.h>
#include <osmscout/util/Logger.h>
#include <osmscout/private/Config.h>

Namespaces

 osmscout
 

Functions

OSMSCOUT_API const char * osmscout::BoolToString (bool value)
 Rteurns a string representation of the given boolean value (either 'true' or 'false') More...
 
OSMSCOUT_API std::string osmscout::ByteSizeToString (FileOffset size)
 
OSMSCOUT_API std::string osmscout::ByteSizeToString (double size)
 
OSMSCOUT_API size_t osmscout::CountWords (const std::string &text)
 
OSMSCOUT_API bool osmscout::GetDigitValue (char digit, size_t &result)
 Returns the numerical value of the given character, if the character is a digit in a numerical value. More...
 
OSMSCOUT_API std::string osmscout::GetFirstInStringList (const std::string &stringList, const std::string &divider)
 Assumes that the string consists of a number of values separated by one of the given divider. More...
 
OSMSCOUT_API std::string osmscout::GetTokensFromEnd (const std::list< std::string > &tokens, size_t count)
 
OSMSCOUT_API std::string osmscout::GetTokensFromStart (const std::list< std::string > &tokens, size_t count)
 
OSMSCOUT_API void osmscout::GroupStringListToStrings (std::list< std::string >::const_iterator token, size_t listSize, size_t parts, std::list< std::list< std::string > > &lists)
 Given a list of strings, individual strings will be combined into a given number of sub groups (individual string concatenated and separated by a space). More...
 
OSMSCOUT_API std::string osmscout::LocaleStringToUTF8String (const std::string &text)
 Convert the given std::string in the current locale to a std::string containing a corresponding UTF8 character sequence. More...
 
OSMSCOUT_API std::wstring osmscout::LocaleStringToWString (const std::string &text)
 Converts the given std::string with content in the current locale to a std::wstring. More...
 
OSMSCOUT_API void osmscout::SimplifyTokenList (std::list< std::string > &tokens)
 Simplifying a token list by merging tokens that start with an upper case letter followed by a token starting with a lower case letter. More...
 
OSMSCOUT_API std::list
< std::string > 
osmscout::SplitStringAtSpace (const std::string &input)
 Converts the given string into a list of whitespace separated (std::isspace()) strings. More...
 
OSMSCOUT_API std::string osmscout::StringListToString (const std::list< std::string > &list, const std::string &separator="/")
 
OSMSCOUT_API bool osmscout::StringToBool (const char *string, bool &value)
 Convert the given string to a boolean value. More...
 
OSMSCOUT_API bool osmscout::StringToNumber (const char *string, double &value)
 
OSMSCOUT_API bool osmscout::StringToNumber (const std::string &string, double &value)
 
OSMSCOUT_API void osmscout::TokenizeString (const std::string &input, std::list< std::string > &tokens)
 Converts the given string into a list of whitespace or colon-separated strings. More...
 
OSMSCOUT_API std::string osmscout::UTF8NormForLookup (const std::string &text)
 Normalise the given std::string containing a UTF8 character sequence for tolerant comparison. More...
 
OSMSCOUT_API std::string osmscout::UTF8StringToLocaleString (const std::string &text)
 Convert the given std::string in UTF-8 a std::string containing to corresponding string in the current locale. More...
 
OSMSCOUT_API std::string osmscout::UTF8StringToLower (const std::string &text)
 Convert the given std::string containing a UTF8 character sequence to lower case using the current global locale. More...
 
OSMSCOUT_API std::string osmscout::UTF8StringToUpper (const std::string &text)
 Convert the given std::string containing a UTF8 character sequence to upper case using the current global locale. More...
 
OSMSCOUT_API std::string osmscout::WStringToLocaleString (const std::wstring &text)
 Converts the given std::wstring to a std::string with content in the current locale. More...