string_hash_to_newline


Description

This function returns a string where the "#" symbol has been converted into a new line. So a string formatted as:

"Hello#World"

Would be printed to the screen as:

Hello
World

IMPORTANT! This function is provided for import compatibility between GameMaker Studio 2 and previous versions of the software and as such this function should not be used except when necessary to replicate obsolete functionality. Instead you should be using the escape characters to mark a new line. For more information on import compatibility see here.


Syntax:

string_hash_to_newline(string);

Argument Description
string The string to convert over multiple lines


Returns:

String


Example:

var str = string_hash_to_newline("Hello#World");
draw_text(32, 32, str);

The above code converts the string with the hash symbol into a string split over two lines then prints it to the screen.