Anonymous user
Strip control codes and extended characters from a string: Difference between revisions
Strip control codes and extended characters from a string (view source)
Revision as of 14:33, 25 June 2011
, 13 years ago→{{header|Python}}
(promoted to task) |
|||
Line 125:
---------
=CG(x 4|)9j)<~-vPQFh"[dq#p</pre>
=={{header|Python}}==
<lang Python>def stripped(x):
return "".join([i for i in x if ord(i) in range(32, 126)])
print stripped("\ba\x00b\n\rc\fd\xc3")</lang>Output:<lang>abcd</lang>
=={{header|Tcl}}==
|