Community discussions

MikroTik App
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam

[Use as-is] Anyone with improvements for my `escapeString` function that converts unprintable characters to HEX escapes?

Fri May 06, 2016 9:55 am

The below gist has a `escapeString` function function that is a start of
Anyone having a `stringify` function to circumvent `:put` not displaying un-printable characters as HEX escapes? ... f1eeda2c2f

Anyone having improvements for it? (I for one would like a loop based filling of the associative array as requested in How to convert a HEX value to a char?)

Output example:
:put [$escapeString value=("f o\00\01\7E\7F\80\81\FE\FFo")] 
f o\00\01~\7F\80\81\FE\FFo

Who is online

Users browsing this forum: Kaldek and 25 guests