Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: longest string

  • Implement a function that received 3 strings and returns the longest string
fn longest(a: &str, b: &str, c: &str) -> &str
  • You will probably need some lifetime annotations.