String Array Metatable For working with string arrays without duplicate values
string_array.metatable | The following metamethods are provided. |
string_array:has(name) | Does this array contain name. |
string_array:add(name) | Add a string to the array if it doesn’t exist in the array. |
string_array:remove(name) | Remove the string from the array if it exists. |
string_array:toggle(name) | Toggles the passed name in the array by adding it if not present or removing it if it is. |
string_array:clear() | Clear the array returning an empty array object |
string_array:tostring() | Convert the array to a string |
string_array:concat(rhs) | Concat string-arrays and strings together |
The following metamethods are provided.
Fields:
Does this array contain name.
Parameters:
Add a string to the array if it doesn’t exist in the array.
Parameters:
Remove the string from the array if it exists.
Parameters:
Toggles the passed name in the array by adding it if not present or removing it if it is.
Parameters:
Clear the array returning an empty array object
Returns:
Convert the array to a string
Returns: