method str.rfind
Byte index of the last occurrence of needle.
Example:
fn main() io {
print("{"hello".rfind("l")}")
}Output
3
pub(api) fn rfind(needle: str) -> usize?Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
needle | str |
Returns
usize?
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:615