I need to convert Vector<String>
to Array
.
I know the this can be done via any cycle. but in my case it's Vector.<String>
, there is may be no need to run cycles
At this pont, I guess this is very shor and simple way to do this:
var vector:Vector.<String> = new <String>["111", "111", "111", "111"];
var array:Array = vector.join(",").split(",");
Ofcource, you need to be shure, thet separator will never be the part of any String
on Vector
. This can force you to set multi-characters separator, like ',,,'
. does this effects on speed?
Is it ok? Is it fast anough?