OxL Reference

method str.rfind

Byte index of the last occurrence of needle.

Example:

oxl✓ checked in CI
fn main() io {
  print("{"hello".rfind("l")}")
}
Output
3
pub(api) fn rfind(needle: str) -> usize?

Since. 1.0.0-beta

Parameters

NameType
needlestr

Returns

usize?

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/text.oxl:615

See also