Sha256: 9bab1f23763801a53706101b17c6e51785215f6276e99dc2a0db0f8117769f46

Contents?: true

Size: 960 Bytes

Versions: 13

Compression:

Stored size: 960 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

13 entries across 13 versions & 1 rubygems

Version Path
gosu-0.9.2-x64-mingw32 Gosu/Utility.hpp
gosu-0.9.2-x86-mingw32 Gosu/Utility.hpp
gosu-0.9.1-x64-mingw32 Gosu/Utility.hpp
gosu-0.9.1-x86-mingw32 Gosu/Utility.hpp
gosu-0.9.0-x86-mingw32 Gosu/Utility.hpp
gosu-0.9.0-x64-mingw32 Gosu/Utility.hpp
gosu-0.8.7.2-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.7.2-x64-mingw32 Gosu/Utility.hpp
gosu-0.8.7.1-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.7.1-x64-mingw32 Gosu/Utility.hpp
gosu-0.8.7-x86-mingw32 Gosu/Utility.hpp
gosu-0.8.7-x64-mingw32 Gosu/Utility.hpp
gosu-0.8.6-x64-mingw32 Gosu/Utility.hpp