The OpenD Programming Language

EncodingScheme.index

Returns the array index at which the (n+1)th code point begins.

The input to this function MUST be validly encoded. This is enforced by the function's in-contract.

class EncodingScheme
ptrdiff_t
index
()
(
const(ubyte)[] s
,
size_t n
)

Parameters

s const(ubyte)[]

the string to be counted

n size_t

the current code point index

Meta