UserFunction; SobGroup_Fresh - HWRM/KarosGraveyard GitHub Wiki
SobGroup_Fresh(group_name)
Description
Create group_name
if it doesn't exist, and clears it regardless. Essentially, this function ensures you get an empty ('fresh') SobGroup.
Example
local my_fresh_group = SobGroup_Fresh("example-group"); -- string "example-group" is returned, and that SobGroup is empty.
-- example usage
SobGroup_SobGroupAdd(my_fresh_group, "some-other-group");
print(my_fresh_group); -- "example-group"
Definition
--- Creates a new sobgroup if one doesn't exist, then clears the group to ensure the group referenced by the return string is clear.
---@param group_name string
---@return string
function SobGroup_Fresh(group_name)
SobGroup_CreateIfNotExist(group_name);
SobGroup_Clear(group_name);
return group_name;
end
Arguments
Param | Type | Description |
---|---|---|
group_name |
string |
The fresh SobGroup's name. |
Returns
Type | Description |
---|---|
string |
The name of the fresh SobGroup (as passed in). |
Related Pages
Comments
Page Status
Updated Formatting? Initial
Updated for HWRM? Initial