: : I'm wanting to peel the last several characters off a string variable, and I'm looking for a good routine/function what will perform this. Here is the situation....
: :
: : read a line from a file into a string variable.
: :
: : the length of the string is variable, and it has several commas on the end of the "usable" data. While the number of commas is variable, at the time that I read the line, the number of commas in the line is known. Does anyone know of a good routine to accomplish this?
: :
: : Thanks in advance;
: : Delljohnb
: :
: You can use the Delete() function for this. Here is a small code, which will remove all commas from the end.
:
: while s[Length(s)]=',' do
: Delete(s, Length(s), 1);
:
: This code also works if the number of commas is unknown.
:
EXCELLENT!!! Wow...fast response. That works great!!! I knew there was a short routine out there. I just couldn't put together the logic manipulation to get a concise one....this will work GREAT!. Thanks.
Delljohnb