phaser/v3/src/utils/string/Reverse.js

18 lines
454 B
JavaScript
Raw Normal View History

/**
2017-10-12 12:57:55 +00:00
* Takes the given string and reverses it, returning the reversed string.
* For example if given the string `Atari 520ST` it would return `TS025 iratA`.
*
* @function Phaser.Utils.String.ReverseString
* @since 3.0.0
*
* @param {string} string - The string to be reversed.
*
* @return {string} The reversed string.
*/
var ReverseString = function (string)
{
return string.split('').reverse().join('');
};
module.exports = ReverseString;