Sign in Join
FPDoc Onlineexperiment

ByteToCharIndex function

In unit sysutils

Convert a character index in Bytes to an Index in characters.

Declaration

pascal
function ByteToCharIndex(const S: string; Index: SizeInt): SizeInt

Description

ByteToCharIndex returns the index (in characters) of the Index-th byte in S.

Errors

This function does not take into account MBCS yet.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.