Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::StringPath Struct Reference

Pre-sized char array holding enough space to represent a file system path. More...

#include <StringPath.h>

Public Member Functions

 operator StringSpan () const
 
StringSpan view () const
 Obtain a StringSpan from the current StringPath.
 
bool assign (StringSpan pathToConvert)
 Assigns a StringView to current StringPath, converting the encoding from UTF16 to UTF8 if needed.
 

Public Attributes

size_t length = 0
 Length of the path in bytes (excluding null terminator)
 
char path [MaxPath]
 Native path on Posix (UTF-8)
 

Static Public Attributes

static constexpr size_t MaxPath = 4096
 Maximum size of paths on current native platform.
 

Detailed Description

Pre-sized char array holding enough space to represent a file system path.

Member Function Documentation

◆ assign()

bool SC::StringPath::assign ( StringSpan pathToConvert)
nodiscard

Assigns a StringView to current StringPath, converting the encoding from UTF16 to UTF8 if needed.

◆ view()

StringSpan SC::StringPath::view ( ) const
inlinenodiscard

Obtain a StringSpan from the current StringPath.

Member Data Documentation

◆ length

size_t SC::StringPath::length = 0

Length of the path in bytes (excluding null terminator)

◆ MaxPath

size_t SC::StringPath::MaxPath = 4096
staticconstexpr

Maximum size of paths on current native platform.

◆ path

char SC::StringPath::path[MaxPath]

Native path on Posix (UTF-8)


The documentation for this struct was generated from the following file: