#include "..\script_component.hpp"

/*
 * Author: IDSolutions
 * Converts spaces in a string to underscores for database storage
 *
 * Arguments:
 * 0: String <STRING>
 *
 * Return Value:
 * Serialized String <STRING>
 *
 * Example:
 * ["Hello World"] call forge_client_misc_fnc_serializeString;
 *
 * Public: Yes
 */

params [["_string", "", [""]]];

if (_string isEqualTo "") exitWith { ERROR_MSG("String is empty"); "" };

(_string splitString " ") joinString "_"