@azizbecha/strkit
Version:
strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.
15 lines (14 loc) • 370 B
TypeScript
/**
* Reverses the characters in a given string.
*
* This function takes an input string and returns a new string
* with the characters in reverse order.
*
* @param str - The string to reverse.
* @returns The reversed string.
*
* @example
* reverse('hello'); // "olleh"
* reverse('12345'); // "54321"
*/
export default function reverse(str: string): string;