Function cgl_rs::utils::rot13

source ·
pub fn rot13(data: &str) -> String
Expand description

Applies the ROT13 substitution cipher to the given string.

Arguments

  • data - A string slice representing the data to apply the ROT13 cipher to.

Returns

A String representing the result of applying the ROT13 cipher to the input string.

Safety

This function is marked as unsafe because it calls an external C function that takes a raw pointer as an argument.

Example

let data = "hello world";
let result = cgl_rs::utils::rot13(data);
assert_eq!(result, "uryyb jbeyq\0");