str_create(char* content)

str_createw(short* content)

Creates a STRING object at runtime. Objects created this way are automatically deleted on closing the engine, or by calling the ptr_remove function.

Parameters:

content - string content, either from a source STRING* pointer, a char array, or a short array in for Unicode strings. A hash '#' followed by a number creates a string with the given size and fills it with spaces.

Returns:

STRING* - pointer to the created STRING.

Speed:

Medium

Examples:

str0 = str_create(""); // creates an empty string 
str1 = str_create("This is a \n new string!");
str2 = str_create("#4000"); // creates a string of 4000 spaces

See also:

STRING, str_cpy, _str , ptr_remove► latest version online