[Overview][Classes][Procedures and functions][Index] Reference for unit 'LazUnicode' (#lazutils)

Reference for unit 'LazUnicode'

Provides encoding-agnostic Unicode string manipulation functions and an enumerator.

uses

  System,

  Classes,

  sysutils,

  LazUTF8;

  

Number of characters (codepoints) to get from the string.

Overview

lazunicode.pas provides encoding-agnostic Unicode string manipulation functions and an enumerator. It works transparently with UTF-8 and UTF-16 encodings, and allows one codebase to work for:

  1. Lazarus using its default UTF-8 encoding
  2. Future FPC and Lazarus versions with Delphi compatible UTF-16 encoding
  3. Delphi compatibility where String is defined as UnicodeString
Remark: Behavior of helper functions are altered using the {$ModeSwitch UnicodeStrings} directive; the correct routines for handling UTF-8 or UTF-16 are called based on the mode switch value.

lazunicode.pas is part of the LazUtils package.


Version 3.2 Generated 2024-02-25 Home