diff options
author | Nathan Angelacos <nangel@tetrasec.net> | 2008-01-25 14:38:35 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@tetrasec.net> | 2008-01-25 14:38:35 +0000 |
commit | 8a2b52812304fb5a936a6a894df6ab1f40a0bda6 (patch) | |
tree | 7a0bd0e00ef2ba1a0b7d283914d7c967368954c8 /lib/format.lua | |
parent | ba6d3d04c004d526568a86e4e87b3572b879a35c (diff) | |
download | acf-core-8a2b52812304fb5a936a6a894df6ab1f40a0bda6.tar.bz2 acf-core-8a2b52812304fb5a936a6a894df6ab1f40a0bda6.tar.xz |
Change order of arguments inf table_to_string and string_to_table
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@650 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/format.lua')
-rw-r--r-- | lib/format.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/format.lua b/lib/format.lua index 60205af..0b7b54b 100644 --- a/lib/format.lua +++ b/lib/format.lua @@ -109,8 +109,8 @@ end -- This code comes from http://lua-users.org/wiki/SplitJoin --- -- example: format.table_to_string(", ", {"Anna", "Bob", "Charlie", "Dolores"}) -function table_to_string (delimiter, list) +-- -- example: format.table_to_string( {"Anna", "Bob", "Charlie", "Dolores"}, ",") +function table_to_string (list, delimiter) local len = getn(list) if len == 0 then return "" @@ -127,8 +127,8 @@ end --gives you the second field which is .... is -- This code comes from http://lua-users.org/wiki/SplitJoin --- example: format.string_to_table(",%s*", "Anna, Bob, Charlie,Dolores") -function string_to_table (delimiter, text) +-- example: format.string_to_table( "Anna, Bob, Charlie,Dolores", ",%s*") +function string_to_table ( text, delimiter) local list = {} local pos = 1 -- this would result in endless loops |