RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.CharLength Function

Returns number of bytes used by a character.

Pascal
function CharLength(const S: String; Index: Integer): Integer;
C++
int CharLength(const AnsiString S, int Index);

SysUtils

Call CharLength to determine the size in bytes of the character located in S at Index. 

If the system is not using a multi-byte character system (MBCS), CharLength always returns 1. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!