1
vote
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, ...
Statistics
|
Visits by Source |
User Actions |




