generateTwoByteString

fun generateTwoByteString(size: Int, generator: (Int) -> UShort): AvailObject

Create an object of the appropriate size, whose descriptor is an instance of TwoByteStringDescriptor. Note that it can only store Unicode characters from the Basic Multilingual Plane (i.e., those having Unicode code points 0..65535). Run the generator for each position in ascending order to produce the code points with which to populate the string.

Return

The new Avail string.

Parameters

size

The size of two-byte string to create.

generator

A generator to provide code points to store.