Table Conversion Functions

All Table conversion functions are mapped on the TB.Convert table.

  • TB.Convert.String2Table(string, separator)
  • TB.Convert.Table2String(table, separator)


TB.Convert.String2Table(string, separator)

result = TB.Convert.String2Table(string, separator)

Converts the given 'string' into a table splitting its items using the provided 'separator' as delimiter between each item. Returns the resulting table.
Leading spaces will be trimmed out from the resulting items.

INPUT

  • string : The string to split
  • separator : The items delimiter (one character)

OUTPUT

  • result : The resulting table


TB.Convert.Table2String(table, separator)

result = TB.Convert.Table2String(table, separator)

Converts all 'table' items into a string using 'separator' as delimiter between each item. Returns the resulting string.

INPUT

  • table : The table of strings to convert
  • separator : The character to use as a separator (one character)

OUTPUT

  • result : The resulting string

NOTE
This function is usable on tables of strings with consecutive numeric indexes starting from 0.

hollywoodlibs/tables/conversion.txt · Ultima modifica: 2016/10/16 08:49 da admin
CC Attribution-Noncommercial 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0