StormByte-System 3.0.0
C++26 process and environment module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::System::Variable Class Reference

Environment variable expansion helpers. More...

#include <StormByte/system/variable.hxx>

Static Public Member Functions

static StormByte::Safe::String Expand (std::string_view str)
 Expand environment variables in UTF-8 text.
static StormByte::Safe::String Expand (std::wstring_view str)
 Expand environment variables in wide text.

Detailed Description

Environment variable expansion helpers.

Windows: ExpandEnvironmentStrings. UNIX: expand ~ to the home path. A literal, a view and a Safe::String all bind to the view. The owned result is built here.

Member Function Documentation

◆ Expand() [1/2]

StormByte::Safe::String StormByte::System::Variable::Expand ( std::string_view str)
static

Expand environment variables in UTF-8 text.

Parameters
strInput. A Safe::String binds through its string_view conversion.
Returns
Expanded owned text.

◆ Expand() [2/2]

StormByte::Safe::String StormByte::System::Variable::Expand ( std::wstring_view str)
static

Expand environment variables in wide text.

Parameters
strInput. A Safe::WString binds through its wstring_view conversion.
Returns
Expanded owned UTF-8 text.

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