Trim
Previous  Top  Next

Prototype

StrOutput:=Trim(strInput)

Description

It returns a string similar to the shown one but without spaces of beginning and end and.

Parameters

StrInput: input string.

Returned value

StrOutput
: output string.

Notes

None.

Example

// It opens a text file
UnFile:=TextFileOpen('c:\documents\letter.txt',false);

// It reads a line from file
text:=TextFileReadln(UnFile);

// It shows a message with the read text
ApplicationLog(_CurrentAgent,'File contains the following text: ' + text);

// It returns the string without spaces
NewText:=Trim(text);

// It shows a message with the modified read text 
ApplicationLog(_CurrentAgent,'Here it is the modified text : ' + NewText);

// It closes the file
FileClose(UnFile);