# ****************
#
# Function generator for func_ra module.
#
# Created by: Ferry Firmansjah (firmanf@itechnologist.com)
#
# More information: http://www.itechnologist.com/tech/func_ra.html
#
# Copyright (C) 2000 Ferry Firmansjah
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
# ****************

func_cat = "func_ra";
generator_add_category (func_cat);
generator_add_function ("array_add"
	, "Description: Adds the specified element at the end of\n"
	& "    the array.\n"
	& "    E.g. public ra[] = {1, 2, 3};\n"
	& "         array_add (ra, 4);\n"
	& "         -> ra[] is now: {1, 2, 3, 4}.\n"
	& "Syntax:    array_add (arrayname[], element);\n"
	& "Return values: E_OK for success, E_GENERAL_ERROR for failure\n"
	& "Parameters: arrayname[]: name of the array.  The array should be\n"
	& "        indexed numerically sequentially to ensure proper\n"
	& "        adding the element.\n"
	& "    element: the element to add to the array."
	, 2
	, "arrayname"
	, "type_edit"
	, ""
	, "element"
	, "type_edit"
	, ""
);


generator_add_function ("array_append"
	, "Description: Appends the elements from the new_elements array\n"
	& "    to the end of the base_array.\n"
	& "    You can specify the start and end position of the new_elements array\n"
	& "    to append.\n"
	& "    E.g. public ra1[] = {1, 2, 3, 4};\n"
	& "         public ra2[] = {5, 6, 7, 8};\n"
	& "         array_append (ra2, ra1, 1, 1);\n"
	& "         -> ra1 is now: {1, 2, 3, 4, 6}.\n"
	& "         -> ra2 is unchanged at {5, 6, 7, 8}.\n"
	& "         array_append (ra1, ra2);\n"
	& "         -> ra1 is unchanged at {1, 2, 3, 4, 6}.\n"
	& "         -> ra2 is now: {5, 6, 7, 8, 1, 2, 3, 4, 6}.\n"
	& "Syntax:    array_append (new_elements[], base_array[] [, new_elements_startIndex\n"
	& "    [, new_elements_lastIndex [, base_array_last_index]]]);\n"
	& "Return values: E_OK;\n"
	& "Parameters: new_elements: array containing new elements to add, indexed sequentially.\n"
	& "    base_array: base array to append new elements to.\n"
	& "    new_elements_startIndex: start index of the new_elements \n"
	& "        array to append (Optional).\n"
	& "    base_array_last_index: the last index of the base array. (helps performance)"
	, 5
	, "new_elements"
	, "type_edit"
	, ""
	, "base_array "
	, "type_edit"
	, ""
	, "new_elements_startIndex "
	, "type_edit"
	, ""
	, "new_elements_lastIndex "
	, "type_edit"
	, ""
	, "base_array_last_index"
	, "type_edit"
	, ""
);


generator_add_function ("array_assign"
	, "Description: Fills the target_ra with the values from the source_ra.\n"
	& "    e.g.: if source_ra[] = {\"One\", \"Two\", \"Three\"}.\n"
	& "          and target_ra[] contains six items\n"
	& "          then after an array_assign (target_ra, source_ra),\n"
	& "            target_ra[] will be: {\"One\", \"Three\", \"Two\", \"Three\", \"Two\", \"One\"}.\n"
	& "    Note that the target_ra[] must already contain elements.\n"
	& "    The function will randomly fill in the target_array with all\n"
	& "    of the values of the source_ra.\n"
	& "    E.g. public ra1[] = {1, 2, 3};\n"
	& "         public ra2[] = {\"a\", \"b\", \"c\", \"d\", \"e\"};\n"
	& "         array_assign (ra2, ra1);\n"
	& "         -> ra1 is unchanged at {1, 2, 3}.\n"
	& "         -> ra2 is now: {2, 1, 3, 1, 2}.\n"
	& "Syntax:    array_assign (target_ra[], source_ra[]);\n"
	& "Return values: none\n"
	& "Parameters: target_ra: target to be filled with the values\n"
	& "    source_ra: array that contain the values to enter into the target_ra"
	, 2
	, "target_ra"
	, "type_edit"
	, ""
	, "source_ra"
	, "type_edit"
	, ""
);


generator_add_function ("array_clear"
	, "Description: Cleans the content of the array.\n"
	& "    ** Updated 2000/09/18: change parameter type from inout to out.\n"
	& "       Thanks Andrew McFarlane. **\n"
	& "    E.g. public ra[] = {1, 2, 3};\n"
	& "         array_clear (ra);\n"
	& "         -> ra[] is now: {}.\n"
	& "Syntax:    array_clear (array_to_clear);\n"
	& "Return values: \n"
	& "Parameters: array_to_clear: The array to clear."
	, 1
	, "array_to_clear"
	, "type_edit"
	, ""
);


generator_add_function ("array_compare"
	, "Description:     Compares 2 arrays, and verify whether they are the same.\n"
	& "    The function will compare the element count, as well as the\n"
	& "    key/value pairs.\n"
	& "    E.g. public ra1[] = {1, 2, 3};\n"
	& "         public ra2[] = {1, 3, 3};\n"
	& "         public ra3[] = {1, 2};\n"
	& "         x = array_compare (ra1, ra2, TRUE);\n"
	& "         -> x returns E_GENERAL ERROR, and the report will show that\n"
	& "            the second element of the arrays are different.\n"
	& "         x = array_compare (ra1, ra3, TRUE);\n"
	& "         -> x returns E_GENERAL_ERROR, and the report will show that\n"
	& "            the array sizes are different;\n"
	& "Syntax:    array_compare (ra1, ra2[, detailed_report]);\n"
	& "Return values: default return values.  E_OK if both arrays are the same,\n"
	& "    E_GENERAL_ERROR if they are different.\n"
	& "Parameters: ra1: Array 1 to compare with.\n"
	& "    ra2: Array 2 to compare to.\n"
	& "    detailed_report: TRUE or FALSE, whether to generate a detailed \n"
	& "        report of the comparison (Optional).  Defaults to FALSE."
	, 3
	, "ra1"
	, "type_edit"
	, ""
	, "ra2"
	, "type_edit"
	, ""
	, "detailed_report"
	, "type_edit"
	, ""
);


generator_add_function ("array_copy"
	, "Description: Makes a replica of the source_array into\n"
	& "    the target_array.\n"
	& "    E.g. public ra1[] = {1, 2, 3};\n"
	& "         array_copy (ra1, ra2);\n"
	& "         -> ra1[] is unchanged at {1, 2, 3}.\n"
	& "         -> ra2[] is now: {1, 2, 3}.\n"
	& "Syntax:    array_copy (source_array[], target_array[]);\n"
	& "Return values: the number of items copied.\n"
	& "Parameters: source_array[]: array to copy from.\n"
	& "    target_array[]: array to copy to (if this is an existing\n"
	& "        array, it's contents will be erased)."
	, 2
	, "source_array"
	, "type_edit"
	, ""
	, "target_array"
	, "type_edit"
	, ""
);


generator_add_function ("array_get_first_index"
	, "Description: Finds the index of the first element in the\n"
	& "    specified arrayname array.\n"
	& "    ** NOTE **: This function has been updated to run faster\n"
	& "        and more efficiently.\n"
	& "    E.g. ra[3] = \"hi\";\n"
	& "         ra[4] = \"there\";\n"
	& "         ra[5] = \"qa\";\n"
	& "         x = array_get_first_index (ra);\n"
	& "         -> x is now: 3.\n"
	& "Syntax:    array_get_first_index (inout arrayname[] [, in pivot]);\n"
	& "Return values: index of the first element, -1 if array is empty.\n"
	& "Parameters: arrayname: name of the array.\n"
	& "    pivot: an index in the array to use as a starting point\n"
	& "        for the search."
	, 2
	, "inout arrayname "
	, "type_edit"
	, ""
	, "in pivot"
	, "type_edit"
	, ""
);


generator_add_function ("array_get_first_last_index"
	, "Description: Finds the index of the first and last elements in the\n"
	& "    specified arrayname array.\n"
	& "    ** NOTE **: This function has been updated to run faster\n"
	& "        and more efficiently.\n"
	& "    E.g. ra[3] = \"hi\";\n"
	& "         ra[4] = \"there\";\n"
	& "         ra[5] = \"qa\";\n"
	& "         array_get_first_last_index (ra, fidx, lidx);\n"
	& "         -> fidx is now: 3.\n"
	& "         -> lidx is now: 5.\n"
	& "Syntax:    array_get_first_last_index (inout ra[], out first_idx, out last_idx);\n"
	& "Return values: E_OK if successful, E_GENERAL_ERROR if array is empty.\n"
	& "Parameters: ra: name of the array.\n"
	& "    first_idx: variable to store the first index.\n"
	& "    last_idx: variable to store the last index."
	, 3
	, "inout ra"
	, "type_edit"
	, ""
	, "out first_idx"
	, "type_edit"
	, ""
	, "out last_idx"
	, "type_edit"
	, ""
);


generator_add_function ("array_get_last_index"
	, "Description: Finds the index of the last element in the\n"
	& "    specified arrayname array.\n"
	& "    ** NOTE **: This function has been updated to run faster\n"
	& "        and more efficiently.\n"
	& "    E.g. ra[3] = \"hi\";\n"
	& "         ra[4] = \"there\";\n"
	& "         ra[5] = \"qa\";\n"
	& "         x = array_get_last_index (ra);\n"
	& "         -> x is now: 5.\n"
	& "Syntax:    array_get_last_index (inout arrayname[] [, startIndex]);\n"
	& "Return values: index of the last element, -1 if array is empty.\n"
	& "Parameters: arrayname: name of the array.\n"
	& "    startIndex: start of the index or location to check (Optional)"
	, 2
	, "inout arrayname "
	, "type_edit"
	, ""
	, "startIndex"
	, "type_edit"
	, ""
);


generator_add_function ("array_insert"
	, "Description: Inserts the specified element into the array\n"
	& "    at the specified index location.  If the specified\n"
	& "    index is already populated, then it will moves \n"
	& "    the element at the index location backward and insert\n"
	& "    the new element at the index location.\n"
	& "    E.g. public ra[] = {1, 2, 3, 4};\n"
	& "         array_insert (ra, 1, 5);\n"
	& "         -> ra[] is now: {1, 5, 2, 3, 4}.\n"
	& "Syntax:    array_insert (arrayname[], arrayindex, element);\n"
	& "Return values: E_OK for success, E_GENERAL_ERROR for failure\n"
	& "Parameters: arrayname[]: name of the array.  The array should be\n"
	& "        indexed numerically sequentially to ensure proper\n"
	& "        shifting of the elements.\n"
	& "    arrayindex: array index entry to insert to\n"
	& "    element: the element to insert into the array."
	, 3
	, "arrayname"
	, "type_edit"
	, ""
	, "arrayindex"
	, "type_edit"
	, ""
	, "element"
	, "type_edit"
	, ""
);


generator_add_function ("array_inverse"
	, "Description: Inverses the order of a sequential array.\n"
	& "    E.g. public ra[] = {1, 2, 3, 4};\n"
	& "         array_inverse (ra);\n"
	& "         -> ra[] is now: {4, 3, 2, 1}.\n"
	& "         array_inverse (ra, 1, 2);\n"
	& "         -> ra[] is now: {4, 2, 3, 1}.\n"
	& "Syntax:    array_inverse (inout array[] [, firstindex [, lastindex]]);\n"
	& "Return values: E_OK if succeeds.\n"
	& "Parameters: array: the array that you want to inverse the content of\n"
	& "    firstindex: the index of the first element (optional)\n"
	& "    lastindex: the index of the last element (optional)"
	, 3
	, "inout array "
	, "type_edit"
	, ""
	, "firstindex "
	, "type_edit"
	, ""
	, "lastindex"
	, "type_edit"
	, ""
);


generator_add_function ("array_isempty"
	, "Description: Determines whether an array is empty or not.\n"
	& "    E.g. public ra1[] = {1, 2, 3};\n"
	& "         public ra2[];\n"
	& "         x = array_isempty (ra1);\n"
	& "         y = array_isempty (ra2);\n"
	& "         -> x is now: FALSE.\n"
	& "         -> y is now: TRUE.\n"
	& "Syntax:    array_isempty (inout ra[]);\n"
	& "Return values: TRUE if ra[] is empty, FALSE if ra[] is not empty.\n"
	& "Parameters: ra[]: the array to check."
	, 1
	, "inout ra"
	, "type_edit"
	, ""
);


generator_add_function ("array_length"
	, "Description: Returns the length of an array.\n"
	& "    E.g. public ra1[] = {1, 2, 3};\n"
	& "         ra2[\"one\"] = 1;\n"
	& "         ra2[\"two\"] = 2;\n"
	& "         x = array_length (ra1);\n"
	& "         -> x is now: 3.\n"
	& "         x= array_length (ra2);\n"
	& "         -> x is now: 2.\n"
	& "Syntax:    array_length (array);\n"
	& "Return values: length of array.\n"
	& "Parameters: array: the array that you want to return the length of"
	, 1
	, "array"
	, "type_edit"
	, ""
);


generator_add_function ("array_pick"
	, "Description: Returns a randomly picked array item.  Does not modify\n"
	& "    the array's content at all.\n"
	& "    E.g. public ra[] = {1, 2, 3, 4};\n"
	& "         x = array_pick (ra);\n"
	& "         -> x can be 1, 2, 3 or 4.\n"
	& "         -> ra[] is unchanged at {1, 2, 3, 4}.\n"
	& "Syntax:    array_pick (pool_ra[][, seed]);\n"
	& "Return values: the value of the selected array item\n"
	& "Parameters: pool_ra: array to pick from\n"
	& "    seed: seed to give to the srand() function (Optional).\n"
	& "        Uses the time is left empty."
	, 2
	, "pool_ra"
	, "type_edit"
	, ""
	, "seed"
	, "type_edit"
	, ""
);


generator_add_function ("array_pick_remove"
	, "Description: Returns a randomly picked array item.  ** Modify\n"
	& "    the array's content by removing the selected item. **\n"
	& "    E.g. public ra[] = {1, 2, 3, 4};\n"
	& "         x = array_pick_remove (ra);\n"
	& "         -> x can be 1, 2, 3 or 4.  Let's say x is 3.\n"
	& "         -> ra[] will now contain one less element: {1, 2, 4}.\n"
	& "Syntax:    array_pick_remove (pool_ra[][, seed]);\n"
	& "Return values: the value of the array item removed randomly from \n"
	& "    the pool_ra. If the pool_ra is empty, it will return \n"
	& "    an E_GENERAL_ERROR.\n"
	& "Parameters: pool_ra: array to pick from\n"
	& "    seed: seed to give to the srand() function (Optional).\n"
	& "        Uses the time is left empty."
	, 2
	, "pool_ra"
	, "type_edit"
	, ""
	, "seed"
	, "type_edit"
	, ""
);


generator_add_function ("array_remove"
	, "Description: Removes the specified index entry from\n"
	& "    the array arrayname, and moves subsequent array\n"
	& "    element's index down.\n"
	& "    E.g. public ra[] = {1, 2, 3, 4};\n"
	& "         x = array_remove (ra, 2);\n"
	& "         -> x is now: 3.\n"
	& "         -> ra[] is now: {1, 2, 4}.\n"
	& "Syntax:    array_remove (arrayname[], arrayindex);\n"
	& "Return values: the removed array's value\n"
	& "Parameters: arrayname[]: name of the array\n"
	& "    arrayindex: array index entry to remove (0 is the first item)"
	, 2
	, "arrayname"
	, "type_edit"
	, ""
	, "arrayindex"
	, "type_edit"
		, ""
	);
	
	
	generator_add_function ("array_shuffle"
		, "Description: Shuffles the content of the array.\n"
		& "    E.g. public ra[] = {1, 2, 3, 4};\n"
		& "         array_shuffle (ra);\n"
		& "         -> ra[] is now: {2, 4, 1, 3}.\n"
	& "Syntax:    array_shuffle (array[]);\n"
	& "Return values: E_OK.\n"
	& "Parameters: array: the array to shuffle"
	, 1
	, "array"
	, "type_edit"
	, ""
);


generator_add_function ("array_subset"
	, "Description: Copy a subset of an array to another array.\n"
	& "    Also allows the user to specify the starting index in the\n"
	& "    target array.\n"
	& "    E.g. public ra1[] = {1, 3, 5, 2, 8, 12, 9};\n"
	& "         array_subset (ra1, ra2, 2, 5);\n"
	& "         -> ra2[] is now: {5, 2, 8, 12}.\n"
	& "Syntax:    array_subset (inout original_array[], out target_array, \n"
	& "    begin_index, end_index [, target_start_index]);\n"
	& "Return values: 0 (E_OK) if succeeds, -1 if the end_index is \n"
	& "    less than the begin_index,\n"
	& "    -2 if the beginning index (begin_index) is invalid, \n"
	& "    -3 if the ending index (end_index) is invalid, \n"
	& "    and -4 if the array is not sequentially ordered (missing an \n"
	& "    index value between begin_index and end_index).\n"
	& "Parameters: original_array: the original array (will not be modified)\n"
	& "    target_array: the target array to store the subset to \n"
	& "        (content will be cleared)\n"
	& "    begin_index: the starting index (inclusive) of the \n"
	& "        original_array to get a subset of\n"
	& "    end_index: the ending index (inclusive) of the original_array \n"
	& "        to get a subset of\n"
	& "    target_start_index: Optional beginning index of the target array.\n"
	& "        (defaults to the same index as the original)"
	, 5
	, "inout original_array"
	, "type_edit"
	, ""
	, "out target_array"
	, "type_edit"
	, ""
	, "begin_index"
	, "type_edit"
	, ""
	, "end_index "
	, "type_edit"
	, ""
	, "target_start_index"
	, "type_edit"
	, ""
);


generator_add_function ("array_swap"
	, "Description: Swap the element content of the specified\n"
	& "    array index locations.\n"
	& "    E.g. public ra[] = {1, 2, 3, 4, 5};\n"
	& "         array_swap (ra, 0, 4);\n"
	& "         -> ra[] is now: {5, 2, 3, 4, 1}.\n"
	& "Syntax:    array_swap (arrayname[], arrayindex1, arrayindex2);\n"
	& "Return values: E_OK if success, E_GENERAL_ERROR if fails \n"
	& "    (e.g. if index doesn't exist)\n"
	& "Parameters: arrayname[]: name of the array\n"
	& "    arrayindex1, arrayindex2: array index entries to swap"
	, 3
	, "arrayname"
	, "type_edit"
	, ""
	, "arrayindex1"
	, "type_edit"
	, ""
	, "arrayindex2"
	, "type_edit"
	, ""
);


generator_add_function ("join"
	, "Description: Returns a concatenated string of the array elements.\n"
	& "    ** Note: ** if the join_start or join_end index value is not in the\n"
	& "    array, then the resulting string will take these inexistent\n"
	& "    elements as containing empty string.\n"
	& "    E.g. public ra[] = {\"hello\", 30, \"geese\"};\n"
	& "         x = join (ra, \" \");\n"
	& "         -> x is now: \"hello 30 geese\".\n"
	& "Syntax:    join (array_to_join[], concatenator[, join_start[, join_end] ] ]);\n"
	& "Return values: E_OK;\n"
	& "Parameters: array_to_join[]: the array to join together.  Make sure that the\n"
	& "        array is indexed sequentially from the join_start index\n"
	& "        to the join_end index.\n"
	& "    join_start: the start index of the array to join (Optional, default to 0).\n"
	& "    join_end: the last index of the array to join (Optional, default \n"
	& "        to the last item in the array)."
	, 4
	, "array_to_join"
	, "type_edit"
	, ""
	, "concatenator"
	, "type_edit"
	, ""
	, "join_start"
	, "type_edit"
	, ""
	, "join_end  "
	, "type_edit"
	, ""
);


generator_add_function ("match_array_to_array"
	, "Description: Compares the actual_array to the expected_array\n"
	& "    and populates the appropriate arrays with information on the \n"
	& "    matching elements or lack thereof.\n"
	& "    ** NOTE **: This matching is not order sensitive.  If you are \n"
	& "        looking for element by element comparison, use the \n"
	& "        array_compare() function.\n"
	& "    E.g. public act_ra[] = {1, 2, 3, 4, \"hello\", \"world\"};\n"
	& "         public exp_ra[] = {\"[12]\", \"10\", \".*lo.*\"};\n"
	& "         match_array_to_array (act_ra, exp_ra, match_ra, unmatched__act_ra, missing_exp_ra);\n"
	& "         -> act_ra[] and exp_ra[] are unchanged.\n"
	& "         -> match_ra[] is now: {\"[12]\", \".*lo.*\"};\n"
	& "         -> missing_act_ra[] is now: [1]-> 2, [2]-> 3, [3]-> 4, [5]-> \"world\".\n"
	& "         -> missing_exp_ra[] is now: [1]-> 10.\n"
	& "Syntax:    match_array_to_array (inout actual_array[], inout expected_array[]\n"
	& "    , out matched_array[], out unmatched_act_array[], out unmatched_exp_array[]) \n"
	& "Return values: E_OK for success.\n"
	& "Parameters: actual_array: array containing the actual elements to compare.\n"
	& "    expected_array: array containing expected elements.  The element\n"
	& "        in the expected_array can contain regular expression\n"
	& "        that will be evaluated during the compare.\n"
	& "    matched_array: Output array for matched msg_array elements.\n"
	& "    unmatched_act_text_array: Output array for elements that exists \n"
	& "        in actual_array, but not in expected_array.\n"
	& "    unmatched_exp_array: Output array for elements that exists in \n"
	& "        expected_array, but not in actual_array."
	, 5
	, "inout actual_array"
	, "type_edit"
	, ""
	, "inout expected_array "
	, "type_edit"
	, ""
	, "out matched_array"
	, "type_edit"
	, ""
	, "out unmatched_act_array"
	, "type_edit"
	, ""
	, "out unmatched_exp_array"
	, "type_edit"
	, ""
);


generator_add_function ("split2"
	, "Description: A modified form of the split() function that allows the\n"
	& "    user to specify multiple character separator (string as opposed to a \n"
	& "    character only).\n"
	& "    E.g. x = \"Hello--there--people--how-are--you\";\n"
	& "         y = split2 (x, ra, \"--\");\n"
	& "         -> y is now: 5.\n"
	& "         -> ra is now: {\"Hello\", \"there\", \"people\", \"how-are\", \"you\"}.\n"
	& "Syntax:    split2 (string, array[, separator]);\n"
	& "Return values: number of elements\n"
	& "Parameters: string: A valid string expression.\n"
	& "    array: The name of the storage array.\n"
	& "    separator: The string containing the separator \"string\" (Optional).\n"
	& "        Unlike the regular split() function, this function \n"
	& "        will treat the whole string as the separator, not as \n"
	& "        separate separators."
	, 3
	, "string"
	, "type_edit"
	, ""
	, "array"
	, "type_edit"
	, ""
	, "separator"
	, "type_edit"
	, ""
);


generator_add_function ("split2_append"
	, "Description: A modified form of the split() function that allows the\n"
	& "    user to specify multiple character separator, and *appends* the new\n"
	& "    entries to the array instead of replacing the array content.\n"
	& "    ** NOTE **: the array must contain sequential elements, with the first\n"
	& "                index having the value of 1.\n"
	& "    E.g. x = \"Hello--there--people--how-are--you\";\n"
	& "         public ra[] = {\"This\", \"is\", \"it\"};\n"
	& "         y = split2 (x, ra, \"--\");\n"
	& "         -> y is now: 5.\n"
	& "         -> ra is now: {\"This\", \"is\", \"it\", \"Hello\", \"there\", \"people\", \"how-are\", \"you\"}.\n"
	& "Syntax:    split2_append (string, array[, separator);\n"
	& "Return values: number of elements added\n"
	& "Parameters: string: A valid string expression.\n"
	& "    array: The name of the storage array to append to.\n"
	& "    separator: The string containing the separator \"string\" (Optional).\n"
	& "        Unlike the regular split() function, this function will \n"
	& "        treat the whole string as the separator, not as separate \n"
	& "        separators."
	, 3
	, "string"
	, "type_edit"
	, ""
	, "array"
	, "type_edit"
	, ""
	, "separator"
	, "type_edit"
	, ""
);


generator_add_function_to_category (func_cat, "array_add");
generator_add_function_to_category (func_cat, "array_append");
generator_add_function_to_category (func_cat, "array_assign");
generator_add_function_to_category (func_cat, "array_clear");
generator_add_function_to_category (func_cat, "array_compare");
generator_add_function_to_category (func_cat, "array_copy");
generator_add_function_to_category (func_cat, "array_get_first_index");
generator_add_function_to_category (func_cat, "array_get_first_last_index");
generator_add_function_to_category (func_cat, "array_get_last_index");
generator_add_function_to_category (func_cat, "array_insert");
generator_add_function_to_category (func_cat, "array_inverse");
generator_add_function_to_category (func_cat, "array_isempty");
generator_add_function_to_category (func_cat, "array_length");
generator_add_function_to_category (func_cat, "array_pick");
generator_add_function_to_category (func_cat, "array_pick_remove");
generator_add_function_to_category (func_cat, "array_remove");
generator_add_function_to_category (func_cat, "array_shuffle");
generator_add_function_to_category (func_cat, "array_subset");
generator_add_function_to_category (func_cat, "array_swap");
generator_add_function_to_category (func_cat, "join");
generator_add_function_to_category (func_cat, "match_array_to_array");
generator_add_function_to_category (func_cat, "split2");
generator_add_function_to_category (func_cat, "split2_append");
