mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-25 21:59:30 +01:00
Defined some useful string conversion macros
This commit is contained in:
parent
9e71372c42
commit
867ac96b4d
1 changed files with 14 additions and 0 deletions
|
@ -128,5 +128,19 @@ unsigned int writeInUTF8(const wstring &iWString, char *oBuffer,
|
|||
*/
|
||||
string writeInUTF8(const wstring &iWString, const string &iContext);
|
||||
|
||||
|
||||
// Useful macros
|
||||
|
||||
// Convert between wstring and string
|
||||
#define wfl(s) convertToWc(s)
|
||||
#define lfw(s) convertToMb(s)
|
||||
// Convert between wstring and utf-8 string
|
||||
#define ufw(s) writeInUTF8((s), "ufw")
|
||||
#define wfu(s) readFromUTF8((s), "wfu")
|
||||
// Convert between string and utf-8 string
|
||||
#define ufl(s) ufw(wfl(s))
|
||||
#define lfu(s) lfw(wfu(s))
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue