ilklhl1Lihl1
2012-06-03 13:31:00
title says it :)
2012-06-03 13:31:00
2012-06-03 13:35:25
type
TCharSet = set of Char;
function StripNonConforming(const S: string;
const ValidChars: TCharSet): string;//Removes characters you tell it to.
var
DestI: Integer;
SourceI: Integer;
begin
SetLength(Result, Length(S));
DestI := 0;
for SourceI := 1 to Length(S) do
if S[SourceI] in ValidChars then
begin
Inc(DestI);
Result[DestI] := S[SourceI]
end;
SetLength(Result, DestI)
end;
function StripNonNumeric(const S: string): string;//Removes numbers
begin
Result := StripNonConforming(S, ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
end;
2012-06-03 13:36:47
2012-06-03 13:37:52