Yep, seen that.
It’s just real tricky, because i post the string to the Max window as well. I test "X ", but it appears as "X", which is well and good, but the length of the string is still 10. I’m pretty sure this prevents the strings concatenating properly.
If the string is say "Rebellion2", then it concats properly with ".syx", then the file writes correctly in windows.
Thanks though, dhjdhjdhj, I’ll take a closer look at that link.
for (i = 10; i < 20 && kit[i] != ""; i++, k++)
kitchar[k] = String.fromCharCode(kit[i]);
In the spirit of "the OP should post the solution when/if found", the problem area of my code was in another function which i considered to be out of the scope of the problem.
Of course, looking back now, I probably should’ve posted more code and the fact that I was trying to translate a sysex string. Lesson learned.
… && kit[i] != "";
In other words, keep copying the array over until a Null character is reacher. This is hard to determine at first glance, unless you know the difference between the ascii codes for Space and Null. Looking at the Max window I had no idea what the hell was going on.