Split name and number
int index ; for ( int i = 0 ; i < s . size ( ) ; i ++ ) { if ( s [ i ] == ' : ' ) { index = i ; break ; } } string name = s . substr ( 0 , index ) ; string number = s . substr ( index + 1 , s . size ( ) - index - 1 ) ; int n = name . length ( ) ;