2013/10/24 Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> > FreeMan wrote: > >> Yes Mark, you rigth. >> This code is working now, Problem was space char in EDT_IP.Text, it comes >> from format. This is normal, but at this time, why "Trim" function NOT >> DELETE space char ????? is this bug ? >> >> var Q : String;Const WhiteSpace = [#0..' ']; >> function My_Trim(S : string): String; var I: Integer; begin >> Result := S; Try I := 1; while I<Length(S)do Begin >> if S[I]in WhiteSpace then Delete(S,I,1) else Inc(I,1); >> end; // while Result := S; Except end; end; >> //copied from /fpc271/rtl/objpas/sysutils/**sysstr.inc line 524 >> function Trim_(const S: string): string; var Ofs, Len: integer; >> begin len := Length(S); while (Len>0) and (S[Len] in >> WhiteSpace) do dec(Len); Ofs := 1; while (Ofs<=Len) and >> (S[Ofs] in WhiteSpace) do Inc(Ofs); result := Copy(S, Ofs, 1 + >> Len - Ofs); end ;begin Q := Trim(EDT_IP.Text);// space not deleted >> Q := Trim_(EDT_IP.Text);// space not deleted Q := My_Trim(EDT_IP.Text); >> // space DELETED if IP4OK(Q)then begin.............. >> > > By the time that arrived here its formatting had been completely lost (as > you can see above), but it doesn't look to bad in the archive > http://lists.lazarus.freepascal.org/pipermail/lazarus/2013-October/084020.htmlso > I'm not entirely sure what's going on
The formatting seemed correct in GMail. -- Frederic Da Vitoria (davitof) Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus