Mercurial > foo_out_sdl
comparison foosdk/sdk/pfc/string-conv-lite.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:e9bb126753e7 | 1:20d02a178406 |
|---|---|
| 1 #pragma once | |
| 2 #include "array.h" | |
| 3 #include "string_base.h" | |
| 4 namespace pfc { | |
| 5 | |
| 6 class wstringLite { | |
| 7 public: | |
| 8 const wchar_t* c_str() const noexcept { | |
| 9 return m_buffer.size() > 0 ? m_buffer.get_ptr() : L""; | |
| 10 } | |
| 11 operator const wchar_t* () const noexcept { return c_str(); } | |
| 12 size_t length() const noexcept { return wcslen(c_str()); } | |
| 13 | |
| 14 pfc::array_t<wchar_t> m_buffer; | |
| 15 }; | |
| 16 | |
| 17 wstringLite wideFromUTF8(const char* pUTF8, size_t inSize); | |
| 18 string8 utf8FromWide(const wchar_t* pWide, size_t inSize); | |
| 19 | |
| 20 wstringLite wideFromUTF8(const char* pUTF8); | |
| 21 string8 utf8FromWide(const wchar_t* pWide); | |
| 22 } |
