reverse

Reverses the order of characters in the str.

Usage Scenarios

  • Text Transformation: In text processing, reverse the order of a string for various purposes.
  • Data Encryption: As a simple form of data encryption or obfuscation.

Example

import { reverse } from 'funtool'

reverse('hello'); // 'olleh'

Signature

function reverse(str: string): string

Parameters

  • str ( string ): The input string.

Returns

  • ( string ): A new string with the characters in reverse order.