rsbx 2.0.0

Enhanced implementation of SeqBox in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use misc_utils::strip_front_end_chars;

pub fn split_key_val_pair(string : &str) -> (&str, &str) {
    let mut spot = 0;
    for (i, c) in string.chars().enumerate() {
        if c == ':' {
            spot = i;
            break;
        }
    }

    (strip_front_end_chars(&string[0..spot],  " "),
     strip_front_end_chars(&string[spot+1..], " "))
}