Files
Xenia-Canary/src/xenia/base/string.cc
gibbed 5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00

31 lines
890 B
C++

/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2020 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/base/string.h"
#include <algorithm>
#include <locale>
#define UTF_CPP_CPLUSPLUS 201703L
#include "third_party/utfcpp/source/utf8.h"
namespace utfcpp = utf8;
namespace xe {
std::string to_utf8(const std::u16string_view source) {
return utfcpp::utf16to8(source);
}
std::u16string to_utf16(const std::string_view source) {
return utfcpp::utf8to16(source);
}
} // namespace xe