diff options
Diffstat (limited to 'tapset/string.stp')
-rw-r--r-- | tapset/string.stp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tapset/string.stp b/tapset/string.stp index 19b8f81f..a4cff3e4 100644 --- a/tapset/string.stp +++ b/tapset/string.stp @@ -45,4 +45,23 @@ function isinstr:long(s1:string,s2:string) %{ /* pure */ else THIS->__retvalue = 0; %} + +/* + * text_str() + * + * Takes a string, and any ASCII characters that are not printable are + * replaced by the corresponding escape sequence in the returned + * string. + */ +function text_str:string(input:string) +%{ /* pure */ + _stp_text_str(THIS->__retvalue, THIS->input, 0, 0); +%} + +function text_strn:string(input:string, len:long, quoted:long) +%{ /* pure */ + _stp_text_str(THIS->__retvalue, THIS->input, THIS->len, THIS->quoted); +%} + + /** @} */ |