Strings

The following functions exist that deal with Strings.

At some time when making your game you will need to use text. Text in games is dealt with by using the string functions (a string is just another way of saying a line of text) and GameMaker: Studio has a complete set of functions that permit you to manipulate strings in many ways, including the insertion of one string in another, the copying of strings and the ability to parse strings for the digits or the letters that they contain.

It is worth noting that there are certain conventions that you can use when creating strings. You can, for example, create a string with quotes using the single quotation marks like this: "...and so Sam said 'Hi there!'". You can also force a line break using the # symbol or by adding a new line in the string creation like this:

GML Code Example

str = "Hello#World";

 // or

 str = "Hello
 World";
 

If you need to actually draw the "#" symbol as part of the text, you can precede it using the "\" symbol like this:

GML Code Example

str = "this will draw the \# symbol";



The following list of functions are all for dealing with strings:

Other than those functions that relate specifically to strings, the Windows target also permits you to use access the clipboard to get and set text information:


Back: Reference



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here