Sephiroth
http://sephiroth.scifi-action.de/board/

$replace_special_chars
http://sephiroth.scifi-action.de/board/viewtopic.php?f=4&t=25
Seite 1 von 1

Autor:  Sephiroth [ 18. März 2008 00:18 ]
Betreff des Beitrags:  $replace_special_chars

;; $replace_special_char(text)
;; returns your normal text if control codes are in it with the text of the control codes instead of them

alias replace_special_char {
  var %txt = $1-,%y = 31
  while (%y) {
    var %tok = $gettok(NUL¢Start of Header¢Start of Text¢End of Text¢End of Transmission¢Enquiry¢Acknowledge¢Bell¢Backspace¢Horizontal Tab¢Line Feed¢Vertical Tab¢Form Feed¢Carriage Return¢Shift Out¢Shift In¢Delete¢-free-¢-free-¢-free-¢-free-¢Negative Acknowledge¢Sychronous Idle¢End of Transmission¢Cancel¢End of Medium¢Substidude¢Escape¢File Seperator¢Group Seperator¢Record Seperator¢Unit Seperator¢Space,$calc(%y +1),162)
    %txt = $replace(%txt,$chr(%y),$+($chr(123),$lower(%tok),$chr(125)))
    dec %y
  }
  return %txt
}

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/