1
vote
Vote UpVote

How Do You Test If a Delphi String Starts With a (Sub)String? What RTL Function is Faster?

About Delphi Programming – in Delphi Strings :: Whatever type of applications you are creating using Delphi, you must be writing some code to handle strings. Delphi provides a healthy assortment of string operators, functions and procedures in RTL. Let's say that you need to determines whether the beginning of a string matches a specified string? Delphi provides at least 4 ways to check if a string starts with another (sub)string. Here's what functions you can use (note that LeftStr and AnsiStartsStr are defined in the strutils.pas unit): const text = 'application'; starter = 'ap' begin AnsiStartsStr(starter, ...
Favorite? Off-Topic? 2012-01-09 05:00

Statistics

Visits: 849
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

VICovSki
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)