08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

string_copy(str,index,count) Returns a substring of str, starting at<br />

position index, and of length count.<br />

string_char_at(str,index) Returns the character in str at position index.<br />

string_delete(str,index,count) Returns a copy of str <strong>with</strong> the part<br />

removed that starts at position index and has length count.<br />

string_insert(substr,str,index) Returns a copy of str <strong>with</strong> substr<br />

added at position index.<br />

string_replace(str,substr,newstr) Returns a copy of str <strong>with</strong> the first<br />

occurrence of substr replaced by newstr.<br />

string_replace_all(str,substr,newstr) Returns a copy of str <strong>with</strong> all<br />

occurrences of substr replaced by newstr.<br />

string_count(substr,str) Returns the number of occurrences of substr<br />

in str.<br />

string_lower(str) Returns a lowercase copy of str.<br />

string_upper(str) Returns an uppercase copy of str.<br />

string_repeat(str,count) Returns a string consisting of count copies of<br />

str.<br />

string_letters(str) Returns a string that only contains the letters in str.<br />

string_digits(str) Returns a string that only contains the digits in str.<br />

string_lettersdigits(str) Returns a string that contains the letters and<br />

digits in str.<br />

The following functions deal <strong>with</strong> the clipboard for storing text.<br />

clipboard_has_text() Returns whether there is any text on the clipboard.<br />

clipboard_get_text() Returns the current text on the clipboard.<br />

clipboard_set_text(str) Sets the string str on the clipboard.<br />

Dealing <strong>with</strong> dates and time<br />

In <strong>Game</strong> <strong>Maker</strong> there are a number of functions to deal <strong>with</strong> dates and time. A date-time<br />

combination is stored in a real number. The integral part of a date-time value is the number of<br />

days that have passed since 12/30/1899. The fractional part of the date-time value is fraction<br />

of a 24 hour day that has elapsed. The following functions exist:<br />

date_current_datetime() Returns the date-time value that corresponds<br />

to the current moment.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!