main.rs286 chars11 lines
The find()
function returns the first index of the substring if found, and None
if not found. It is used together with pattern matching in this case to determine whether the substring is found or not, and retrieve the index of the first occurrence if it exists.
gistlibby LogSnag