[][src]Function rpgdk::reader::random_word

pub fn random_word(file_contents: &str) -> String

Picks a random substring between spaces

Arguments

  • file_contents - A string from a file (or not).

Example

// Assume names is string of values separated by spaces, i.e. "Delza Dezla Zedla".
let name = String::from(reader::random_word(&names));