ddc
Functions | Variables
ddcLocale.h File Reference

locale functions More...

#include <locale.h>
#include <string>
Include dependency graph for ddcLocale.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ddcInitLocale (void)
 initialize the locale from current environment if not already initialized More...
 
std::wstring string2wstring (const std::string &src)
 
std::string wstring2string (const std::wstring &src)
 
std::wstring wstoupper (const std::wstring &ws)
 convert a std::wstring to upper-case More...
 
std::wstring wstolower (const std::wstring &ws)
 convert a std::wstring to lower-case More...
 
std::string stoupper (const std::string &s)
 convert a std::string to upper-case according to current locale (implicit conversion to and from wstring) More...
 
std::string stolower (const std::string &s)
 convert a std::string to lower-case according to current locale (implicit conversion to and from string) More...
 

Variables

bool ddcLocaleInitialized
 sentinel indicating whether current process has initialized the locale More...
 

Detailed Description

locale functions

Function Documentation

◆ ddcInitLocale()

void ddcInitLocale ( void  )

initialize the locale from current environment if not already initialized

References ddcLocaleInitialized.

Referenced by ddcInitGlobal(), string2wstring(), and wstring2string().

Here is the caller graph for this function:

◆ string2wstring()

std::wstring string2wstring ( const std::string &  src)

convert a std::string in current locale's character set to a std::wstring (requires setlocale(LC_CTYPE,"whatever"))

References ddcInitLocale().

Referenced by TxCase::expand(), stolower(), and stoupper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wstring2string()

std::string wstring2string ( const std::wstring &  src)

convert a std::wstring to a std::string in current locale's character set (requires setlocale(LC_CTYPE,"whatever"))

References ddcInitLocale().

Referenced by TxCase::expand(), stolower(), and stoupper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wstoupper()

std::wstring wstoupper ( const std::wstring &  ws)

convert a std::wstring to upper-case

Referenced by TxCase::expand(), and stoupper().

Here is the caller graph for this function:

◆ wstolower()

std::wstring wstolower ( const std::wstring &  ws)

convert a std::wstring to lower-case

Referenced by TxCase::expand(), and stolower().

Here is the caller graph for this function:

◆ stoupper()

std::string stoupper ( const std::string &  s)

convert a std::string to upper-case according to current locale (implicit conversion to and from wstring)

References string2wstring(), wstoupper(), and wstring2string().

Referenced by RmlMakeUpper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stolower()

std::string stolower ( const std::string &  s)

convert a std::string to lower-case according to current locale (implicit conversion to and from string)

References string2wstring(), wstolower(), and wstring2string().

Referenced by CSocketAddr::ParseSocketAddr(), RmlMakeLower(), and StringToBool().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ddcLocaleInitialized

bool ddcLocaleInitialized

sentinel indicating whether current process has initialized the locale

Referenced by ddcInitLocale().