W3cubDocs

/Rust

Function std::path::is_separator

pub fn is_separator(c: char) -> bool

Determines whether the character is one of the permitted path separators for the current platform.

Examples

use std::path;

assert!(path::is_separator('/')); // '/' works for both Unix and Windows
assert!(!path::is_separator('❤'));

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/path/fn.is_separator.html