promotional bannermobile promotional banner

LibString

Provides useful methods for string manipulation

General Information

LibString adds new functions to Lua's string table for common tasks found in most string libraries.

New string functions

  • string.concat concatenates a list of strings.
  • string.formatn enhances the default string.format with index-specifiers like "%1s %10i" for accessing arguments out-of-order. This is especially useful for localization.
  • string.insert inserts a string into another at a specified index.
  • string.join concatenates a list of strings by inserting a separator string between each.
  • string.prefix checks whether a string is a prefix of another (i.e. starts with).
  • string.split splits a string at given delimeters and returns the respective substrings either as list or table.
  • string.gsplit does the same as string.split but can be used in for loops like Lua's string.gmatch.
  • string.suffix checks whether a string is a suffix of another (i.e. ends with).
  • string.tostring accepts a list of arguments and returns a list of strings (Lua's tostring accepts only one argument).
  • string.ltrim, string.rtrim and string.trim remove characters at the beginning, end or both ends of a string, respectively.

Detailed function descriptions can be found on the documentation page.

The LibString Team

profile avatar
  • 1
    Followers
  • 9
    Projects
  • 384.4K
    Downloads
Donate

More from _ForgeUser4351698View all

  • Imhothar's Bags project image

    Imhothar's Bags

    • 364.7K
    • Addons

    An advanded replacement for the default inventory windows.

    • 364.7K
    • August 5, 2017
    • Addons
  • BananAH project image

    BananAH

    • 139.4K
    • Addons

    Auction house addon for RIFT

    • 139.4K
    • May 12, 2014
    • Addons
  • LibPGCEx project image

    LibPGCEx

    • 2.2K
    • Addons

    LibPGC extension

    • 2.2K
    • November 9, 2013
    • Addons
  • API Browser project image

    API Browser

    • 2.0K
    • Addons

    Provides a Wiki-like browser for the API documentation of Rift and other third party libraries.

    • 2.0K
    • August 5, 2013
    • Addons
    • +1
  • Imhothar's Bags project image

    Imhothar's Bags

    • 364.7K
    • Addons

    An advanded replacement for the default inventory windows.

    • 364.7K
    • August 5, 2017
    • Addons
  • BananAH project image

    BananAH

    • 139.4K
    • Addons

    Auction house addon for RIFT

    • 139.4K
    • May 12, 2014
    • Addons
  • LibPGCEx project image

    LibPGCEx

    • 2.2K
    • Addons

    LibPGC extension

    • 2.2K
    • November 9, 2013
    • Addons
  • API Browser project image

    API Browser

    • 2.0K
    • Addons

    Provides a Wiki-like browser for the API documentation of Rift and other third party libraries.

    • 2.0K
    • August 5, 2013
    • Addons
    • +1