Darren McBride wrote:
Bingo. Thanks for that. I had presumed that there must be some way of
addressing the array directly into some form of string representation
(PChar, AnsiChar etc). I will test this code this evening.

There is a way to convert the array to a string without adding extra bytes to the end of the array:


SetString(s, PChar(@a1[1]), Length(a1));

On the other hand, why are you defining your strings as arrays of bytes in the first place? Why not just define them as strings?

const
  a1 = 'htt.verinto.c';
  a2 = 'om/stomer.asp';

If you want them addressable as arrays of characters, then you can even do this:

const
  a1: array[1..13] of Char = 'htt.verinto.c';

--
Rob

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to