[amx-netlinx-common] r24 committed - - Added delim parameter to int_array_to_string() to allow use of an ar...

2 views
Skip to first unread message

amx-netli...@googlecode.com

unread,
May 13, 2010, 2:26:03 AM5/13/10
to netlinx-comm...@googlegroups.com
Revision: 24
Author: kim.john.burgess
Date: Wed May 12 23:25:02 2010
Log: - Added delim parameter to int_array_to_string() to allow use of an
arbitrary delimiter when imploded
http://code.google.com/p/amx-netlinx-common/source/detail?r=24

Modified:
/trunk/String.axi

=======================================
--- /trunk/String.axi Wed May 12 09:29:43 2010
+++ /trunk/String.axi Wed May 12 23:25:02 2010
@@ -301,11 +301,12 @@
/**
* Converts an integer array into a comma serperated string list of its
values.
*
- * @param ints am intger array of values to 'listify'
+ * @param ints an intger array of values to 'listify'
+ * @param delim a string array to insert between entries
* @return a string list of the values
*/
define_function char[STRING_RETURN_SIZE_LIMIT] int_array_to_string(
- integer ints[])
+ integer ints[], char delim[])
{
stack_var char list[STRING_RETURN_SIZE_LIMIT]
stack_var integer i
@@ -326,7 +327,7 @@
return string_size_error()
}

- list = "list, ',', itoa(ints[item])"
+ list = "list, delim, itoa(ints[item])"
}
}

Reply all
Reply to author
Forward
0 new messages