The OpenD Programming Language

firstSequence

Returns the length of the first encoded sequence.

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

size_t
firstSequence
(
E
)
(
const(E)[] s
)

Parameters

s const(E)[]

the string to be sliced

Examples

assert(firstSequence("\u20AC1000") == "\u20AC".length);
assert(firstSequence("hel") == "h".length);

Meta

Standards

Unicode 5.0, ASCII, ISO-8859-1, ISO-8859-2, WINDOWS-1250, WINDOWS-1251, WINDOWS-1252