Delphi String Manipulation

Berikut format memanipulasi string dalam delphi

Chr(<Integer>);
Copy(<SourceString>, <start pos>, <length>);
CompareStr(<SourceString1>, <SourceString2>);
Delete(<SourceString>, <start pos>, <length>);
IntToStr(<SourceInteger>);
Insert(<fromSourceString>, <toSourceString>,
<start pos>);
Length(<SourceString>);
Pos(‘<find this>’, <SourceString>);
SetLength(<SourceString>, <length>);
StringOfChar(‘<Character>’, <quantity>);
StrPas(<PCharString>);
StrPCopy(<SourceString>);
StrToInt(<SourceString>);
StrToIntDef(<SourceString>, <DefaultInteger>);
StrTo<???>(<SourceString>);
<???>ToStr(<Source???>); ??? = Float, Currency,
Date, Time, DateTime
StringReplace(<SourceString>, ‘<replace this>’,
‘<with this>’, [rfReplaceAll]);
Trim(<SourceString>); trim l/r blanks
TrimLeft(<SourceString>); trim left blanks
TrimRight(<SourceString>); trim right blanks
LowerCase(<SourceString>);
UpperCase(<SourceString>);
UpCase(<Char>);

Semoga bermanfaat

One Response

  1. Cool topic! ;)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.