Sha256: 68901ec9139b64287f54f3b03fd5ff3fb2db9e9384d3dc774385241bc756a716

Contents?: true

Size: 932 Bytes

Versions: 78

Compression:

Stored size: 932 Bytes

Contents

//! \file Utility.hpp
//! General purpose utility functions.

#ifndef GOSU_UTILITY_HPP
#define GOSU_UTILITY_HPP

#include <string>
#include <vector>

namespace Gosu
{
    //! Converts an std::string into an std::wstring.
    std::wstring utf8ToWstring(const std::string& utf8);
    //! Converts an std::wstring into an std::string.
    std::string wstringToUTF8(const std::wstring& ws);
    
    //! Converts an std::string into an std::wstring using local encoding.
    std::wstring widen(const std::string& s);
    //! Converts an std::wstring into an std::string using local encoding.
    std::string narrow(const std::wstring& ws);
    
    //! Returns the user's preferred language, at the moment of calling the function. Expect return
    //! values such as 'en_US', 'de_DE.UTF-8', 'ja', 'zh-Hans'. You can rely only on the first two letters
    //! being a common language abbreviation.
    std::string language();
}

#endif

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
gosu-0.8.7.2 Gosu/Utility.hpp
gosu-0.8.7.1 Gosu/Utility.hpp
gosu-0.8.7 Gosu/Utility.hpp
gosu-0.8.6 Gosu/Utility.hpp
gosu-0.8.6-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.6.pre1 Gosu/Utility.hpp
gosu-0.8.5 Gosu/Utility.hpp
gosu-0.8.5-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.5.pre1 Gosu/Utility.hpp
gosu-0.8.4-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.4 Gosu/Utility.hpp
gosu-0.8.3-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.3 Gosu/Utility.hpp
gosu-0.8.2-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.2 Gosu/Utility.hpp
gosu-0.8.1-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.1 Gosu/Utility.hpp
gosu-0.8.0 Gosu/Utility.hpp
gosu-0.8.0-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.0.pre7 Gosu/Utility.hpp