I have a string and want to add some hypens in the middle. I know I can use Substring or something, but want to be sure that I can not use String.Format or other native function to do the job.
String.Format("{0:###-###}", "ABCDEF"); // <-- does not work
Or you can use the Insert method from string such as below
You can work out the insert position instead of hard coding above by simply divide the length/2