luaur-cli-lib 0.1.2

Shared CLI helpers for the luaur tools.
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub fn join_paths_string_view_string_view(lhs: &str, rhs: &str) -> alloc::string::String {
    let mut result = lhs.to_string();
    if !result.is_empty()
        && result.as_bytes().last() != Some(&b'/')
        && result.as_bytes().last() != Some(&b'\\')
    {
        result.push('/');
    }
    result.push_str(rhs);
    result
}