N2DG3KEFV2L7I3ORYVU4NQT3K2OMJILGIXCUF3GUCYBC237G6DWQC
U2PKVLFH26Z2FCROEOLMAMYGB3NFVFBQPMJQ46IYO5NRHCOJOLHQC
HA7HWWCWLZNJVHU7BI4IL5HTT26V44HJKDRZHXMT5AN6B7NH7N6AC
TLQZYMWADNQSS5PXO3TIJVPAG42NOAV3GR5S55TCUQU73LRQQ57QC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
W2M2UMQWCG5K3MYSCAJJADB7FGYAM4ODV6BEBAEBPM7J3ZJCHCBAC
fn test_split() { parts := matrix.split("@user:server.com") assert parts[0] == '@' assert parts[1] == 'user' assert parts[2] == 'server.com'}
fn test_split() {
parts := matrix.split("@user:server.com")
assert parts[0] == '@'
assert parts[1] == 'user'
assert parts[2] == 'server.com'
}
pub fn split(id string) []string { mut parts := []string{} parts << id.substr(0,1) left := id.substr(1,id.len) parts << left.before(':') parts << left.after(':') return parts}
pub fn split(id string) []string {
mut parts := []string{}
parts << id.substr(0,1)
left := id.substr(1,id.len)
parts << left.before(':')
parts << left.after(':')
return parts
user_data['username'] = user_id
user_data['username'] = split(user_id)[1]