Thanks
Frank
strX:=stringreplace(strX,'''','',[rfReplaceAll]);
--
John Elrick
Here MyString now = ABC - no trailing quote
Frank
Frank
John Elrick wrote:
> AnsiExtractQuotedStr
>
> --
> John Elrick
"John Elrick" wrote:
>AnsiExtractQuotedStr
Andrew
Frank Russello <fr...@habasoft.com> wrote in message
3A8C0A16...@habasoft.com...
I assume that you are asking for a function that will remove the quote
characters
from each side of a string?
if so..
This function is part of AdvanceStringCore - you are free to use this
code privatly for non commercial application (providing that credit
and a link to www.excommunicant.co.uk is given). For more tools
(included ones I wont give away here !) please wisit our web page
and download the 30 day evaluation version
//*********************************************************************
//*********************************************************************
//** CHOP **
//*********************************************************************
//*********************************************************************
FUNCTION Chop(CONST source:STRING;CONST mask:CHAR):STRING;
{ Version 1.0 Lachlan Fairgrieve 1998
Remove [Mask] Characters from the ends of a string
@@Lach@lan@@@ >>> Lach@lan
Initialise & Validate:
Result
StringLength Counter
That there is a string to work with
Prepare sp
Prepeare ep
Find End of wanted string :
Move ep backwards until it no longer
points to a [mask] character
Find Start of wanted string :
Move sp forwards until it no longer
points to a [mask] character
Produce Result :
The [source] characters between sp and ep
}
VAR
sp, // [Source] Pointer Running from the start
ep:pchar; // [Source] Pointer Running the end
index,
tsl:Integer; // TempStringLength variable
rs:string; // Intermediate Result String
tc:char; // TempChar
BEGIN
//*********************************************
//** INTITIALISE & VALIDATE **
//*********************************************
Result:='';
tsl:=length(source);
if tsl < 1 then exit;
sp:=Pointer(Source);
ep:=sp;
index:=tsl;
//*********************************************
//** FIND THE END OF THE WANTED STRING **
//*********************************************
inc(ep,tsl-1);
while (ep^ = mask) and (index>-1) do
BEGIN
dec(index);
dec(ep);
END;
inc(ep);
//*********************************************
//** FIND THE START OF THE WANTED STRING **
//*********************************************
if index < 1 then exit;
index:=tsl;
while (sp^ = mask) and (index>-1)do
BEGIN
inc(sp);
dec(index);
END;
//********************************************
//** PRODUCE RESULT **
//********************************************
if index<1 then exit;
Result:='';
rs:='';
while sp <> ep do
BEGIN
tc:=sp^;
rs:=rs+tc;
inc(sp);
end;
result:=rs;
END; // of chop
--
lac...@excommunicant.co.uk
AdvanceString - Powerful easy to use
document and string processing tools.
Download the demo at:
www.excommunicant.co.uk
lachlan <lac...@SPAMMEPLENTYexcommunicant.co.uk> wrote
> file://*************************************************** ...
> file://***************************************************
> file://** CHOP
> file://*************************************************** ...
> file://***************************************************
I really hate that *feature* of outlook express -
When I check the post though it dosent happen - ie it
looked as it should otherwise I would have cancelled the
message and tried again :((((((
Don't we all? If life was easy there would be no merit. :)