ReadOnlyArray is an abstract over an ordinary Array which only exposes APIs that don't modify the instance, hence "read-only".

Note that this doesn't necessarily mean that the instance is immutable. Other code holding a reference to the underlying Array can still modify it, and the reference can be obtained with a cast.

Methods

@:runtimeinlineiterator():ArrayIterator<T>

Returns an iterator of the Array values.

join(sep:String):String

Returns a string representation of this Array, with sep separating each element.

The result of this operation is equal to Std.string(this[0]) + sep + Std.string(this[1]) + sep + ... + sep + Std.string(this[this.length-1])

If this is the empty Array [], the result is the empty String "". If this has exactly one element, the result is equal to a call to Std.string(this[0]).

If sep is null, the result is unspecified.

toString():String

Returns a string representation of this Array.

The result will include the individual elements' String representations separated by comma. The enclosing [ ] may be missing on some platforms, use Std.string() to get a String representation that is consistent across platforms.