Re: Delphi: If Folder or Drive


[ Delphi Forum -- by DelphiLand ]

Posted by WAllison on November 19, 2003 at 17:21:03:

In Reply to: Re: If Folder or Drive posted by Joey on November 19, 2003 at 13:15:09:

: Not to be a further pain in the ass but can you explain further please? coz i dont know what to do with 's' and it comes up with incompatible type erros and stuff, thx ;-)


u asked how to check if theres a '\' at the end of a string - if not then add one to it:

the s is the string; it could be a filepath

'c:\temp'

would become

'c:\temp\'

s[Length(s)] returns the last character of the string s


[ Delphi Forum -- by DelphiLand ]