Lua code help (stuf text)
View Single Post
05-24-13, 10:07 PM
An Onyxian Warder
Join Date: Nov 2008
I have a very similar issue I posted about
and Phanx pointed me to this thread as it closely relates to my problem.
What SDPhantom suggested (unit:gsub("(%S)%S*%s+","%1%.")) is what I looked for, but I need to make this work with languages other than english. The string I test with is "Echo of a Pandaren Monk" and the single 'a' appears to be the problem if I use the following:
unit:gsub("(.[\128-\191]*)%S+%s", "%1. ")
I get "E. o. a . Monk" instead of "E. o. a P. Monk".
I also don't understand what exactly is .[\128-\191]* supposed to mean but it makes it work for non-english characters (haven't tested chinese and korean though, but I do not look for such functionality).
Sorry for writing in between.
View Public Profile
Send a private message to Rainrider
Find More Posts by Rainrider