Added String<T, N>.ParseArgs().

This commit is contained in:
2025-04-14 13:40:00 -07:00
parent 8d28f3547c
commit c5b281d73c
2 changed files with 51 additions and 3 deletions

View File

@@ -693,7 +693,7 @@ namespace ehs
Vector<Str_32> Console::GetArgs_32(const UInt_64 bufferSize)
{
#if defined(EHS_OS_WINDOWS)
return UTF::To_32(GetCommandLineW()).Split(U" ");
return UTF::To_32(GetCommandLineW()).ParseArgs();
#elif defined(EHS_OS_LINUX)
File cmdFile("/proc/self/cmdline", Mode::READ, Disposition::OPEN);
Array<Byte> data = cmdFile.ReadArray(bufferSize);
@@ -725,7 +725,7 @@ namespace ehs
Vector<Str_16> Console::GetArgs_16(const UInt_64 bufferSize)
{
#if defined(EHS_OS_WINDOWS)
return Str_16(GetCommandLineW()).Split(L" ");
return Str_16(GetCommandLineW()).ParseArgs();
#elif defined(EHS_OS_LINUX)
File cmdFile("/proc/self/cmdline", Mode::READ, Disposition::OPEN);
Array<Byte> data = cmdFile.ReadArray(bufferSize);
@@ -755,7 +755,7 @@ namespace ehs
Vector<Str_8> Console::GetArgs_8(const UInt_64 bufferSize)
{
#if defined(EHS_OS_WINDOWS)
return UTF::To_8(GetCommandLineW()).Split(" ");
return UTF::To_8(GetCommandLineW()).ParseArgs();
#elif defined(EHS_OS_LINUX)
File cmdFile("/proc/self/cmdline", Mode::READ, Disposition::OPEN);
Array<Byte> data = cmdFile.ReadArray(bufferSize);