blkar_lib/json_utils.rs
1use misc_utils::strip_front_end_chars;
2
3pub fn split_key_val_pair(string : &str) -> (&str, &str) {
4 let mut spot = 0;
5 for (i, c) in string.chars().enumerate() {
6 if c == ':' {
7 spot = i;
8 break;
9 }
10 }
11
12 (strip_front_end_chars(&string[0..spot], " "),
13 strip_front_end_chars(&string[spot+1..], " "))
14}