Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
os-string.hh
Go to the documentation of this file.
1#pragma once
3
4#include <optional>
5#include <string>
6#include <string_view>
7
8namespace nix {
9
17using OsChar =
18#if defined(_WIN32) && !defined(__CYGWIN__)
19 wchar_t
20#else
21 char
22#endif
23 ;
24
32using OsString = std::basic_string<OsChar>;
33
37using OsStringView = std::basic_string_view<OsChar>;
38
39std::string os_string_to_string(OsStringView path);
40
41OsString string_to_os_string(std::string_view s);
42
46#ifndef _WIN32
47# define OS_STR(s) s
48#else
49# define OS_STR(s) L##s
50#endif
51
52}
return s
Definition lexer.l:459
std::basic_string< OsChar > OsString
Definition os-string.hh:32
std::basic_string_view< OsChar > OsStringView
Definition os-string.hh:37
char OsChar
Definition os-string.hh:17