From 8a2b52812304fb5a936a6a894df6ab1f40a0bda6 Mon Sep 17 00:00:00 2001 From: Nathan Angelacos Date: Fri, 25 Jan 2008 14:38:35 +0000 Subject: 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 --- lib/format.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/format.lua') 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 -- cgit v1.2.3