Sign in Join
FPDoc Onlineexperiment

UTF8StartsText function

In unit LazUTF8

Determines if a string starts with the specified value.

Declaration

pascal
function UTF8StartsText(const ASubText: string; const AText: string)
: Boolean

Arguments

ASubText

Value to locate at the start of the string.

AText

String to examine in the function.

Function result

True when the strings starts with the specified text.

Description

UTF8StartsText determines if the value in AText begins with the value in ASubText. Both values can contain a valid UTF-8-encoded string. The return value is False when ASubText is an empty string (''), or ASubText contains more characters (codepoints) than the value in AText.

UTF8StartsText calls Utf8Copy and UTF8CompareLatinTextFast to perform a case-insensitive comparison between the values.

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