Quantcast WoWInterface - View Single Post - Stuf LUA help
Thread: Stuf LUA help
View Single Post
11-07-17, 03:09 AM   #14
A Cliff Giant
Join Date: Apr 2017
Posts: 70
Ammako, human language is relatively fault-tolerant (unlike programming ones), so was able to guess what you intended to write.
Thanks for explaining the result of this loop with gsub and link. No experience with pattern matching but I believe it does something like: "If, starting from beginning, there's at least one digit (1-st group) followed by three digits (2-nd group), then between 1-st and second group insert comma". Sounds somehow similar to BreakupLageNumbers.
Seeing that the applicable numbers for this procedure are between 999 and 100000, I wonder if it would be more efficient to use extra "if" instead of "while" loop.
Edit. About writing the code which won't be used after this patch: I would be really hesitant to do it. I would think about whether having the exact desired output would be worth the trouble or be content with, for example, AbbreviateLargeNumbers.

Last edited by Kakjens : 11-07-17 at 03:49 AM. Reason: BreakupLageNumbers, some strange philosophy
  Reply With Quote