eval
Log in

Pick the Shorter Slice

100 points

Implement shorter, which returns whichever of two string slices has fewer bytes. If tie; return b.

Required signature

pub fn shorter<'a>(a: &'a str, b: &'a str) -> &'a str

Visible tests

Your solution

Log in to submit a solution.