blkar 7.2.7

Multithreaded archiver offering bit rot protection and sector level recoverability
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::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..], " "),
    )
}