Download ET - RAD user manual
Transcript
30
ET - RAD user manual
ABC
ABC
ABC
ABC
= ABC
< abc
<= abc
<> abc
String processing routines There are a number of string manipulation routines that
are given by example below. Click on any of them to learn more (and also click on
WrapText for another, more involved routine).
var
Source, Target : string;
begin
Source := '12345678';
Target := Copy(Source, 3, 4); // Target now = '3456'
Target := '12345678';
Insert('-+-', Target, 3); // Target now = '12-+-345678'
Target := '12345678';
Delete(Target, 3, 4); // Target now = '1278'
Target := StringOfChar('S', 5); // Target now = 'SSSSS'
Source := 'This is a way to live A big life';
// Target set to 'This is THE way to live THE big life'
Target := StringReplace(before, ' a ', ' THE ',
[rfReplaceAll, rfIgnoreCase]);
end;
Click on the following to learn more:
AnsiLeftStr Returns leftmost characters of a string
AnsiMidStr Returns middle characters of a string
AnsiRightStr Returns rightmost characters of a string
AnsiStartsStr Does a string start with a substring?
AnsiContainsStr Does a string contain another?
AnsiEndsStr Does a string end with a substring?
AnsiIndexStr Check substring list against a string
AnsiMatchStr Check substring list against a string
AnsiReverseString Reverses characters in a string
AnsiReplacStr Replaces all substring occurences
DupeString Repeats a substring n times
StrScan Scans a string for a specific character
StuffString Replaces part of a string text
Trim Removes leading and trailing white space
TrimLeft Removes leading white space
TrimRight Removes trailing white space
Converting from numbers to strings
CurrToStrF Convert a currency value to a string with formatting
S.T.A. DATA srl