Function reverse_string
Source pub fn reverse_string(text: &str) -> String
Expand description
Reverses a string.
§Arguments
text - A string slice that holds the text to reverse.
§Returns
- A
String containing the reversed text.
§Examples
let text = "hello world";
let result = loki_text::transform::reverse_string(text);
assert_eq!(result, "dlrow olleh");