algorithmz 1.1.5

This is the corresponding implemenation of the python module of the same name.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Reverse string
///
/// Reverse a string using four different approaches: recursive, iterative, pythonic (using reversed), and ultra-pythonic (using slicing).
///
/// # Examples
///
/// Basic usage:
/// ```
/// let result = algorithmz::string::reverse_string("abc");
/// assert_eq!(result, String::from("cba"));
/// ```
pub fn reverse_string(original: &str) -> String {
    let reversed: String = original.chars().rev().collect();

    return reversed;
}