FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
utf8_tools.h
1 /**********************************************************\
2 Original Author: Dan Weatherford
3 Imported with permission by: Richard Bateman (taxilian)
4 
5 Imported: Aug 7, 2010
6 License: Dual license model; choose one of two:
7  New BSD License
8  http://www.opensource.org/licenses/bsd-license.php
9  - or -
10  GNU Lesser General Public License, version 2.1
11  http://www.gnu.org/licenses/lgpl-2.1.html
12 
13 Copyright 2009 Dan Weatherford, Facebook inc
14 \**********************************************************/
15 
16 #pragma once
17 #ifndef H_FB_UTF8
18 #define H_FB_UTF8
19 
20 #include <string>
21 #include "../3rdParty/utf8/utf8.h"
22 
23 namespace FB {
24 
34  std::string wstring_to_utf8(const std::wstring& src);
35 
45  std::wstring utf8_to_wstring(const std::string& src);
46 
56  std::wstring wstring_tolower(const std::wstring& src);
57 
58 };
59 
60 #endif // H_FB_UTF8
61 
std::wstring wstring_tolower(const std::wstring &src)
Converts a std::wstring to lowercase.
Definition: utf8_tools.cpp:63
std::string wstring_to_utf8(const std::wstring &src)
Accepts a std::wstring and returns a UTF8-encoded std::string.
Definition: utf8_tools.cpp:37
std::wstring utf8_to_wstring(const std::string &src)
Accepts a UTF8-encoded std::string and returns a std::wstring.
Definition: utf8_tools.cpp:50