Toolbox is an Ace2 library that addon authors can include in there addons to provide some utility functions.
Dependency: Ace2
Current functions:
* Trim -- Trims the whitespace from the beginning and end of a string.
* LTrim -- Trims the whitespace from the beginning of a string.
* RTrim -- Trims the whitespace from the end of a string.
* Split -- Takes a string, ie. "Item 1:Item 2:Item 3:Item 4" and creates a LUA table from it. The delimiter can be any regex pattern. Will also optionally trim the whitespace from each entry.
* Reverse -- Reverses a given string, ie. "teststring" will return "gnirtstset"
* Commify -- Adds commas to numbers, ie. 10000 will return "10,000"
* Wordify -- Returns words for a number, ie 1000 will return "one thousand"
* Clone -- Creates a copy (clone) of a table
* Unit related functions -- Returns Realm, Race, Faction, Class, Name, Level of player
Installation: Just unzip into %WOWFolder%\Interface\Addons or embed the file into your addon.
Wiki: http://www.wowace.com/wiki/Toolbox-1.0
More libraries can be found at http://www.wowace.com
Changelog
Toolbox-1.0-r24648
* Updated TOC
-- Changed interface version to 20003 (2.0.3)
* Removed Debugging functions
-- Causes conflict with AceDebug
Toolbox-1.0-r22633
* Updated Clone function
-- Should be able to copy tables with tables as keys, please test and report
* Added some Unit related functions
-- Race, Faction, Server, Realm, Class, Name, Level, etc.
* Added some basic debug functions
-- CustomDebug
-- Debug
Toolbox-1.0-r19331
* Removed 1.12 compatibility code
Toolbox-1.0-r17737
! TBC compatible
-- This version should now work in both 1.12 and TBC
-- Can someone please test it on PTR
* Updated Reverse function to be TBC compatible
* Updated TOC to make Toolbox-1.0 work in TBC
Toolbox-1.0-r17619
+ Added Clone function
-- Creates a shallow copy (clone) of a table
Toolbox-1.0-r16120
* Renamed function: NumberToWords
-- NumberToWords is now called Wordify
Toolbox-1.0-r15803
* Update TOC
-- Added some Ace2 tokens
+ New function: NumberToWords
-- Returns words for a number
-- NumberToWords(1000) returns "one thousand" as string
+ Added localization
-- AceLocale-2.2 is now a requirement.
Toolbox-1.0-r15663
+ Added LUA 5.1 string.gmatch check, courtesy Tekkub
* Update function: Commify
-- Fixed problem with decimals
Toolbox-1.0-r15616
* Update function: Commify
-- Changed some sanity checks around (thx phyber)
Toolbox-1.0-r15615
+ New function: Commify
-- Adds commas to numbers
-- Commify(10000) returns "10,000" as string
+ New function: Reverse
-- Reverse a string
-- Reverse("teststring") will return "gnirtstset"