Sign in Join
FPDoc Onlineexperiment

UTF8UpperCaseFast function

In unit LazUTF8

Gets the uppercase value for the specified text. Optimized to improve speed for ASCII content in the argument.

Declaration

pascal
function UTF8UpperCaseFast(const AText: string): string

Arguments

AText

String with the content examined and converted to its uppercase representation.

Function result

Uppercase value for the specified text.

Description

UTF8UpperCaseFast examines the ordinal values for the characters in AText to determine how the return value is derived. It is optimized for ASCII content (byte values in the range 1..128). It converts individual characters in the range ['a'..'z'] by subtracting 32 from their ordinal values.

If a non-ASCII byte value is found in AText, the return value is derived by calling UTF8UpperCase with the value in AText as an argument.

Added in LazUtils version 4.0.

See also

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