|
|
|
@ -37,6 +37,15 @@ concept IsChar = std::same_as<T, char>;
|
|
|
|
|
*/
|
|
|
|
|
[[nodiscard]] std::u8string BufferToU8String(std::span<const u8> buffer);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Same as BufferToU8String, but returns a string view of the buffer.
|
|
|
|
|
*
|
|
|
|
|
* @param buffer Buffer of bytes
|
|
|
|
|
*
|
|
|
|
|
* @returns UTF-8 encoded std::u8string_view.
|
|
|
|
|
*/
|
|
|
|
|
[[nodiscard]] std::u8string_view BufferToU8StringView(std::span<const u8> buffer);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Converts a std::u8string or std::u8string_view to a UTF-8 encoded std::string.
|
|
|
|
|
*
|
|
|
|
@ -57,6 +66,15 @@ concept IsChar = std::same_as<T, char>;
|
|
|
|
|
*/
|
|
|
|
|
[[nodiscard]] std::string BufferToUTF8String(std::span<const u8> buffer);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Same as BufferToUTF8String, but returns a string view of the buffer.
|
|
|
|
|
*
|
|
|
|
|
* @param buffer Buffer of bytes
|
|
|
|
|
*
|
|
|
|
|
* @returns UTF-8 encoded std::string_view.
|
|
|
|
|
*/
|
|
|
|
|
[[nodiscard]] std::string_view BufferToUTF8StringView(std::span<const u8> buffer);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Converts a filesystem path to a UTF-8 encoded std::string.
|
|
|
|
|
*
|
|
|
|
|