Strip control codes and extended characters from a string: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
m →‎{{header|Wren}}: Minor tidy
Miks1965 (talk | contribs)
PascalABC.NET
Line 1,692:
ASCII: )z8i9aKNsFwas#bB}PT
</pre>
 
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
function StripControlCodes(s: string): string
:= s.Where(c -> c.Code in 32..126).JoinToString;
 
begin
var s := #127'abc'#1#15#31'def'#12;
Print(StripControlCodes(s));
end.
</syntaxhighlight>
{{out}}
<pre>
abcdef
</pre>
 
 
=={{header|Peloton}}==