4#include "../Foundation/StringSpan.h"
13struct StringNativeFixed
18 [[nodiscard]]
operator StringSpan()
const {
return StringSpan({buffer, length},
true, StringEncoding::Native); }
19 [[nodiscard]] StringSpan view()
const {
return *
this; }
20 [[nodiscard]] Span<native_char_t> writableSpan()
const {
return {buffer, N}; }
22 [[nodiscard]]
bool assign(StringSpan str)
28 [[nodiscard]]
bool append(StringSpan str)
30 StringSpan::NativeWritable
string = {{buffer, N}, length};
31 if (not str.appendNullTerminatedTo(
string))
33 length =
string.length;
43#if SC_PLATFORM_WINDOWS
44 static constexpr size_t MaxPath = 260;
45#elif SC_PLATFORM_APPLE
46 static constexpr size_t MaxPath = 1024;
50 detail::StringNativeFixed<MaxPath> path;
char native_char_t
The native char for the platform (wchar_t (4 bytes) on Windows, char (1 byte) everywhere else )
Definition PrimitiveTypes.h:34
Pre-sized char array holding enough space to represent a file system path.
Definition StringPath.h:41
static constexpr size_t MaxPath
Maximum size of paths on current native platform.
Definition StringPath.h:48