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

(→‎{{header|AutoHotkey}}: Add AutoHotkey)
Line 9:
On a non-ASCII based system, we consider characters that do not have a corresponding glyph on the ASCII table (within the ASCII range of 32 to 126 decimal) to be an extended character for the purpose of this task.
 
=={{header|AutoHotkey}}==
{{trans|Python}}
<lang AHK>Stripped(x){
Loop Parse, x
if Asc(A_LoopField) > 31 and Asc(A_LoopField) < 128
r .= A_LoopField
return r
}
MsgBox % stripped("`ba" Chr(00) "b`n`rc`fd" Chr(0xc3))</lang>
=={{header|C}}==
<lang C>#include <stdio.h>