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.10.9.pre1 Gosu/Utility.hpp
gosu-0.10.8 Gosu/Utility.hpp
gosu-0.10.7 Gosu/Utility.hpp
gosu-0.10.6 Gosu/Utility.hpp
gosu-0.10.5 Gosu/Utility.hpp
gosu-0.10.5.pre0 Gosu/Utility.hpp
gosu-0.10.5.pre1 Gosu/Utility.hpp
gosu-0.10.4 Gosu/Utility.hpp
gosu-0.10.3 Gosu/Utility.hpp
gosu-0.10.2 Gosu/Utility.hpp
gosu-0.10.2.pre1 Gosu/Utility.hpp
gosu-0.10.1.2 Gosu/Utility.hpp
gosu-0.10.1.1 Gosu/Utility.hpp
gosu-0.10.1 Gosu/Utility.hpp
gosu-0.10.0 Gosu/Utility.hpp
gosu-0.9.2 Gosu/Utility.hpp
gosu-0.9.2.pre1 Gosu/Utility.hpp
gosu-0.9.1 Gosu/Utility.hpp
gosu-0.9.0 Gosu/Utility.hpp
gosu-0.9.0.pre1 Gosu/Utility.hpp