Game Maker Games, Articles, Tutorials & More

Game Maker Network


Howdy, Guest! Please sign in or register an account.

Print

string_reverse

By Daniel · December 24, 2008

Reverses the characters in a string

// string_reverse(string)
// Reverses the characters in a string

var len, reverse, c;
len = string_length(argument0);

reverse = "";
for (c=1; c<=len; c+=1)
  reverse += string_char_at(argument0,len+1-c);

return reverse;

Categories: String handling

Comments

There are no comments to display.

Post a Comment

You must be signed in to post comments.

Advertisement