Thema: Delphi extract and verify

Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#2

Re: extract and verify

  Alt 24. Aug 2008, 19:45
Hello

Zitat:
to verify that the S always starts with 'BTR' i mean like

if not (S) starts with ('BTR') then exit else Continue .
The function AnsiStartsStr() indicates whether one string is a (case-sensitive) prefix of another.

AnsiStartsStr returns True if the string specified by ASubText appears as the leading part of the string specified by AText. Comparison is performed case-sensitively.


Zitat:
and i want to be sure the file name contains only A..Z or 0..9 so only letters and numbers .
Go through all characters in the string and check if they are within the desired range (A..Z or 0..9)
Thomas
  Mit Zitat antworten Zitat