avail Index To Java Index
Convert from a zero-based index into the Avail string, where code points can be up to 0x10FFFF, to a zero-based index into the Java string that would have to use surrogate pairs (two Chars) per code point over 0xFFFF. The resulting index will be greater than or equal to the Avail index, depending how many large code points occur prior to the given index.