Amazon.com Widgets Fun Code of the Week #4

Fun Code of the Week #4

By Nick at June 08, 2012 06:14
Filed Under: Delphi, Fun Code

Adapted from my answer on StackOverflow:

function RemoveChars(const aString: string; aCharsToRemove: TSysCharSet): string;
var
  C: Char;
begin
  Result := '';
  for C in aString do
  begin
    if not CharInSet(C, aCharsToRemove) then
    begin
      Result := Result + C;
    end;
  end;
end;
blog comments powered by Disqus

My Book

A Pithy Quote for You

"Always be a first-rate version of yourself, instead of a second-rate version of somebody else."    –  Judy Garland

Amazon Gift Cards

General Disclaimer

The views I express here are entirely my own and not necessarily those of any other rational person or organization.  However, I strongly recommend that you agree with pretty much everything I say because, well, I'm right.  Most of the time. Except when I'm not, in which case, you shouldn't agree with me.