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? 2010-03-30 08:35


Visits: 664
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Primoz Gabrijelcic
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


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