UI module

frame_string

procedureextensionexperimentalsince 0.31.0Source

A copy of text that lives until the next frame, for strings a node keeps.

Example↗
ui := headless();
defer free_ui(*ui);
copy := frame_string(*ui, "kept until the next frame");
assert(copy == "kept until the next frame");
frame_string :: (ui: *UI_State, text: string) -> string

A copy of text that lives until the next frame, for strings a node keeps.

Parameters

ui: *UI_State
the UI whose frame arena holds the copy.
text: string
the string to copy.

Returns

string
Example↗
ui := headless();
defer free_ui(*ui);
copy := frame_string(*ui, "kept until the next frame");
assert(copy == "kept until the next frame");

See also