faster way to add data[x] to a string
BlitzMax Forums/BlitzMax Beginners Area/faster way to add data[x] to a string
| ||
hi, i need to copy a byte[] to the end of a string sometime ive got up to 1000 byte and my routine screws up. do you know a better / faster way ? local data:byte[4096] local dat:string for r = 1 to xxx dat = dat+chr$ (data[r]) next thx |
| ||
str :+ String.FromBytes( data, data.Length)Still one too many allocations but better than increasing the string by 1 each time. |
| ||
this works fine. thanks grable |