Skip to main content

partition

Function partition 

Source
pub fn partition<'a>(s: &'a str, delimiter: &str) -> Option<(&'a str, &'a str)>
Expand description

Try to divide a string into two parts at the specified delimiter.

ยงReturns

  • None if delimiter is not present
  • Some tuple of the two strings if it is