Skip to content

Commit 80fde23

Browse files
committed
Add MAIN_SEPARATOR_STR
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
1 parent 1be5c8f commit 80fde23

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/path.rs

+6
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ pub fn is_separator(c: char) -> bool {
268268
#[stable(feature = "rust1", since = "1.0.0")]
269269
pub const MAIN_SEPARATOR: char = crate::sys::path::MAIN_SEP;
270270

271+
/// The primary separator of path components for the current platform.
272+
///
273+
/// For example, `/` on Unix and `\` on Windows.
274+
#[unstable(feature = "main_separator_str", issue = "94071")]
275+
pub const MAIN_SEPARATOR_STR: &str = crate::sys::path::MAIN_SEP_STR;
276+
271277
////////////////////////////////////////////////////////////////////////////////
272278
// Misc helpers
273279
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)