LowerCase
function LowerCase(S: String): String;
Example
procedure ScriptEvent(var Value: variant);
begin
Value := LowerCase('Velox EDI'); // velox edi
end;
Usage
Returns a lowercase copy with ASCII-only mapping for normal String and UnicodeString values but locale-aware mapping for a WideString actual value.
Parameters and result
| Item | Type | Description |
|---|---|---|
S | String | Text to copy and convert to lowercase. ANSI, WideString and UnicodeString values are accepted. |
| Result | String | Lowercase copy. Empty input returns empty. |
Additional Technical Info
LowerCase returns a lowercased copy of a string and leaves the input unchanged. For the normal PascalScript String type in this build, it changes only ASCII A through Z to a through z; all other bytes are retained unchanged.
The example is fictional and source-reviewed only.
Actual-type dispatch
This is modified PascalScript standard-function selector 11:
- ANSI
Stringuses PascalScriptFastLowerCase, an explicit ASCII ordinal loop. UnicodeStringcalls installed DelphiLowerCase, which also maps only seven-bit ASCIIA-Z.WideStringcalls DelphiWideLowerCase; on Windows this usesCharLowerBuffWand the current user locale, so its international behavior can differ from the other two branches.
The ordinary public String path is therefore deterministic for ASCII identifiers and does not lowercase accented/non-Latin letters. Do not assume full Unicode case folding. If human-text locale mapping is required for a normal ANSI script value, review AnsiLowerCase, including its service-account locale and code-page limitations.
Case conversion alone is not a safe canonicalisation for security identifiers or language-neutral equality: Unicode case folding can change length and has locale-specific rules that neither the normal ASCII branch nor a simple Windows lowercasing call fully represents.
External references
Created 2026-07-15