StrUnicodeLen Function

Action

Determines the number of characters a string in unicode format consists of. The terminating NULL is not regarded as a character.

Include file

Kernel.bdh

Syntax

StrUnicodeLen( in sUnicode: string ): number;

Return value

The number of characters the string consists of.

Parameter Description
sUnicode String whose length is to be retrieved.

Example

dcltrans
  transaction TMain
  var
    sAnsi, sUnicode: string;
  begin
    sAnsi := "hello world!";
     
    StrAnsi2Unicode(sUnicode, sizeof(sUnicode), sAnsi);
    writeln(StrUnicodeLen(sUnicode));
    StrUnicode2Ansi(sAnsi, sizeof(sAnsi), sUnicode);
  end TMain;