OxL Reference

method str.trimPrefix

self without the leading prefix (unchanged if it does not start with it).

Example:

oxl✓ checked in CI
fn main() io {
  print("v1.0".trimPrefix("v"))
}
Output
1.0
pub(api) fn trimPrefix(prefix: str) -> str

Since. 1.0.0-beta

Parameters

NameType
prefixstr

Returns

str

Effects

none declared (pure unless the body says otherwise)

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

See also