Sign in Join
FPDoc Onlineexperiment

UTF8LowerCase function

In unit LazUTF8

Converts the specified string to lowercase using Unicode case mapping rules.

Declaration

pascal
function UTF8LowerCase(const AInStr: string; const ALanguage: string='')
                       : string

Description

UTF8LowerCase is a String function used to convert the UTF-8-encoded value in AInStr to its lowercase equivalent. UTF8LowerCase uses Unicode Data defined on on the Unicode.org website at ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt. FTP lik removed. The conversion is performed using the Case Mapping Rules defined in https://www.ksu.ru/eng/departments/ktk/test/perl/lib/unicode/UCDFF301.html#CaseMappings [dead link renoved].

ALanguage indicates the language code to use for the conversion. ALanguage should be specified using ISO 639-1 format, which uses 2 characters to represent each language. If the language has no code in ISO 639-1, then the 3-chars code from ISO 639-2 should be used. For example: "tr"for the Turkish language locale. Special handling is provided in the function for Turkish ('tr') and Azeri ('az') language codes. ALanguage can be set to an empty string ('') for maximum speed in the conversion.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.