What would be the easiest way to convert a string "HELLO" to an array of character "H" "E" "L" "L" "O" ? I have a way to do it with a for loop but I'm wondering if there is nothing even more simple.
I tried out your version and it gives the correct results, but mine is approximately 30% faster. I don't actually know why. Maybe someone could enlighten us?
just saw your answer too. Using the typecast is slower than the original version with making an array and setting the array to a string. The fact that it is slower simply doesn't compute with me, but I've just measured it(P4 2.8 GHz, hyperthreading).
I'm still left asking the question why the results are in this order. From my (obviously incorrect) knowledge of HOW this SHOULD work, I thought you were on a sure-fire winner.