Function yarns::head [] [src]

pub fn head(word: &String) -> String

Gets the first char of a string, and returns it as string.

let hello = String::from("Hello");
let first = yarns::head(&hello);
//first = (String)"H"