Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
program StripCharacters(output);
|
||||
|
||||
function Strip (s: string; control, extended: boolean): string;
|
||||
var
|
||||
index: integer;
|
||||
begin
|
||||
Strip := '';
|
||||
for index:= 1 to length(s) do
|
||||
if not ((control and (ord(s[index]) <= 32)) or (extended and (ord(s[index]) > 127))) then
|
||||
Strip := Strip + s[index];
|
||||
end;
|
||||
|
||||
var
|
||||
test: string;
|
||||
i: integer;
|
||||
|
||||
begin
|
||||
setlength(test, 40);
|
||||
randomize;
|
||||
for i := 1 to length(test) do
|
||||
test[i] := char(1 + random(255));
|
||||
writeln ('Original: ', test);
|
||||
writeln ('No CNTL: ', Strip(test, true, false));
|
||||
writeln ('No extnd: ', Strip(test, false, true));
|
||||
writeln ('ASCII: ', Strip(test, true, true));
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue