Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

replace-unicode-escapes (See related posts)

   1  
   2      replace-unicode-escapes: func [s [string!] /local c uc] [
   3          parse s [
   4              any [
   5                  some chars
   6                  | [mark: #"\"
   7                     #"u" copy c 4 hex-c (
   8                      change/part mark uc: decode-unicode-char c 6  ; 6 = length "\uxxxx"
   9                      ) -1 skip :mark
  10                  | escaped]
  11              ]
  12          ]
  13      ]
  14  

You need to create an account or log in to post comments to this site.


Click here to browse all 5355 code snippets

Related Posts