natiny_script_make_string

C
NatinyScriptValue natiny_script_make_string(const char* text);

Wraps a null-terminated string for a later script operation.

Parameters

Name Type Description
text const char* Null-terminated bytes to wrap; must remain valid until the value is consumed; NULL is sent to the script as nil

Returns

Type Description
NatinyScriptValue Value tagged NATINY_SCRIPT_STRING, with a borrowed pointer and byte length from strlen

Example

C
natiny_script_set(script, "game.title", natiny_script_make_string("Sponza"));