I was writing some code that will check each character of a string against a "character map" to decide if the string had any invalid chars in it. After i was done, I decided there has to be a better way. But im brain dead right now and cant think and its bugging me so much, so i turned here. What do you guys think...

Here's what i have now, can it be done better:

[pascal]Const VALID_CHARS_MAP_1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ';


function ValidChars(Str : String; Map : String) : Boolean;
var i,k : integer;
Continue : Boolean;
begin
Result := False;

if Length(Str) < 1 then Exit;
if Length(Map) < 1 then Exit;

Continue := True;

for i := 0 to Length(Str) - 1 do
begin
if Continue = False then Exit;
Continue := False;
for k := 0 to Length(Map) - 1 do
begin
if Str[i] = Map[k] then
begin
Continue := True;
break;
end;
end;
end;
Result := True;
end;[/pascal]