pub fn RunLengthEncode(s: &str) -> String
Expand description

Run-length encodes a string.

§Arguments

  • s - A string slice to be compressed.

§Returns

  • A String containing the run-length encoded representation of the input string.

§Example

from your_module import run_length_encode
compressed = run_length_encode("aaabbbccc")
print(compressed)  # Output: "a3b3c3"