Skip to main content

AsStringTrim

property AsStringTrim: string read write;

Example

procedure ScriptEvent(var Value: Variant);
begin
Locals['Code'].AsStringTrim := ' NZ ';
Value := Locals['Code'].AsStringTrim;
end;

Usage

AsStringTrim applies Velox Trim to the decrypted string view on read and before canonical Value assignment on write.

Additional Technical Info

The getter returns Trim(AsString) and therefore decrypts/Variant-converts first. The setter trims its string argument before assigning through AsString/Value, preserving validation and encryption.

Delphi Trim removes leading/trailing spaces and control characters; internal whitespace is unchanged. Null normally converts to empty before trimming. Trimming is performed on every read and write but does not mutate Value on read.

Official references: Delphi Trim, Free Pascal Trim. Free Pascal confirms compatible broad whitespace behaviour but is not proof of the shipped Delphi runtime.

Created 2026-07-15