I'm a beginner myself, but I'd probably read the string as a set of char's, and say after 3 char's add '-', after another 3 char's add '-'....