Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
os-string.hh File Reference
#include <optional>
#include <string>
#include <string_view>

Go to the source code of this file.

Macros

#define OS_STR(s)
 

Typedefs

using nix::OsChar
 
using nix::OsString = std::basic_string<OsChar>
 
using nix::OsStringView = std::basic_string_view<OsChar>
 

Functions

std::string nix::os_string_to_string (OsStringView path)
 
OsString nix::string_to_os_string (std::string_view s)
 

Macro Definition Documentation

◆ OS_STR

#define OS_STR ( s)
Value:
return s
Definition lexer.l:459

Create string literals with the native character width of paths

Typedef Documentation

◆ OsChar

using nix::OsChar
Initial value:
char

Named because it is similar to the Rust type, except it is in the native encoding not WTF-8.

Same as std::filesystem::path::value_type, but manually defined to avoid including a much more complex header.

◆ OsString

using nix::OsString = std::basic_string<OsChar>

Named because it is similar to the Rust type, except it is in the native encoding not WTF-8.

Same as std::filesystem::path::string_type, but manually defined for the same reason as OsChar.

◆ OsStringView

using nix::OsStringView = std::basic_string_view<OsChar>

std::string_view counterpart for OsString.