From 0c4ab186a9461ec2877d6955ce1740e162756fd7 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Thu, 3 Feb 2011 09:31:51 +0100 Subject: [PATCH] Updated RELEASE_NOTES and documentation (Closes: #1120). --- RELEASE_NOTES | 2 ++ TODO | 2 +- doc/mpsl_overview.txt | 4 ++-- doc/mpsl_quickref.txt | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index d213467..732b467 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -17,6 +17,8 @@ MPSL Release Notes - The adel() function no longer returns the deleted element. - mpsl_compile_file() now has an additional argument holding the source file search path. + - The following functions had had their arguments swapped: + - split(). 1.0.9 ----- diff --git a/TODO b/TODO index d2aa8d1..4e115e2 100644 --- a/TODO +++ b/TODO @@ -27,7 +27,6 @@ Pending Enhancements * 1109: There must be possible to have executable components with arguments in compact symbols (as in 'h.code(a1,a2).other'). * 1115: Add C++ style comments. - * 1120: Invert split() arguments. * 1121: Invert join() arguments. * 1122: Invert sscanf() arguments. * 1123: Invert regex() arguments. @@ -202,5 +201,6 @@ Closed (Wed, 26 Aug 2009 17:41:01 +0200). * 1110: Change the trace system to an executable mpdm_t value (Thu, 25 Mar 2010 16:58:46 +0100). + * 1120: Invert split() arguments (Thu, 03 Feb 2011 09:31:25 +0100). Email bugs to angel@triptico.com diff --git a/doc/mpsl_overview.txt b/doc/mpsl_overview.txt index 6e4a26b..721ed30 100644 --- a/doc/mpsl_overview.txt +++ b/doc/mpsl_overview.txt @@ -493,7 +493,7 @@ The split() and join() functions can be used to convert strings into arrays and vice-versa. Examples: /* sets a to [ 12, 'abcd', 356, '', 'xxx' ] */ - local a = split(':', '12:abcd:356::xxx'); + local a = split('12:abcd:356::xxx', ':'); /* sets b to 12->abcd->356->->xxx */ local b = join('->', a); @@ -502,7 +502,7 @@ The split() function can have a special separator, NULL, that makes it explode the string in characters: /* sets c to [ 't', 'h', 'i', 's' ] */ - local c = split(NULL, "this"); + local c = split("this"); The splice() function can be used to delete, insert or replace a subset of a string with another one. It returns a two element array: one with the diff --git a/doc/mpsl_quickref.txt b/doc/mpsl_quickref.txt index 08d10f2..d9a16d9 100644 --- a/doc/mpsl_quickref.txt +++ b/doc/mpsl_quickref.txt @@ -108,9 +108,9 @@ i = cmp(str1, str2); Compares two strings, returns del = splice(str1, Inserts str2 inside str1 at str2, offset, del); offset, deleting del characters (returns the deleted string) -ary = split(sep, str); Splits str using sep as +ary = split(str, sep); Splits str using sep as separator -ary = split(NULL, str); Splits str in characters +ary = split(str); Splits str in characters str = join(sep, ary); Joins ary into str, using sep as separator (inverse of split()) -- 2.11.4.GIT