UTF8

Provides UTF-8 aware string functions implemented in pure lua.

This is a library and therefore not meant to be installed as an addon.

To use it in your own addon, just add the file utf8.lua to your .toc file and in your addons .lua  file reference the library package as follows:

local utf8 = Apollo.GetPackage("Jos_eu:UTF8-1.1").tPackage
 
Usage example:
 
local utf8 = Apollo.GetPackage("Jos_eu:UTF8-1.1").tPackage
local str = "Schönes Wetter!"
Print(utf8.len(str)) -- prints 15, with string.len(str) it would print 16
Print(utf8.sub(str, 1, 7)) -- Schönes
Print(utf8.reverse(str))   -- !retteW senöhcS
Print(utf8.upper(str))     -- SCHÖNES WETTER!
Print(utf8.lower(str))     -- schönes wetter!
 
This is a WildStar version of the WoW port UTF8 of Kyle Smith's "utf8.lua".

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    223105
  • Created
    Aug 6, 2014
  • Last Released File
    Aug 22, 2014
  • Total Downloads
    3,158
  • License

Categories

Members

Recent Files