1
mod lock_macros;
2

            
3
666
pub fn next_string_sequence(string: &str) -> String {
4
666
    let mut bytes = string.as_bytes().to_vec();
5
666
    for (index, char) in string.char_indices().rev() {
6
666
        let mut next_char = u32::from(char) + 1;
7
666
        if next_char == 0xd800 {
8
            next_char = 0xE000;
9
666
        } else if next_char > u32::from(char::MAX) {
10
            continue;
11
666
        }
12

            
13
666
        let mut char_bytes = [0; 6];
14
666
        bytes.splice(
15
666
            index..,
16
666
            char::try_from(next_char)
17
666
                .unwrap()
18
666
                .encode_utf8(&mut char_bytes)
19
666
                .bytes(),
20
666
        );
21
666
        return String::from_utf8(bytes).unwrap();
22
    }
23

            
24
    String::default()
25
666
}