Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
if string.sub(p, -1, -1) == "/" then
p=string.sub(p, 1, -2)
end
p.chomp!("/")
p = p.strip_suffix(std::path::is_separator).unwrap_or(p);
let p = if ::std::path::is_separator(p.chars().last().unwrap()) {
&p[0..p.len()-1]
} else {
p
};