Add MAIN_SEPARATOR_STR

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
This commit is contained in:
Alex Saveau 2022-02-13 14:20:29 -08:00
parent 1be5c8f909
commit 80fde23a75
No known key found for this signature in database
GPG Key ID: 3F8D5B16EB169D48

View File

@ -268,6 +268,12 @@ pub fn is_separator(c: char) -> bool {
#[stable(feature = "rust1", since = "1.0.0")]
pub const MAIN_SEPARATOR: char = crate::sys::path::MAIN_SEP;
/// The primary separator of path components for the current platform.
///
/// For example, `/` on Unix and `\` on Windows.
#[unstable(feature = "main_separator_str", issue = "94071")]
pub const MAIN_SEPARATOR_STR: &str = crate::sys::path::MAIN_SEP_STR;
////////////////////////////////////////////////////////////////////////////////
// Misc helpers
////////////////////////////////////////////////////////////////////////////////