OxL Reference

method str.trimSuffix

self without the trailing suffix.

Example:

oxl✓ checked in CI
fn main() io {
  print("main.oxl".trimSuffix(".oxl"))
}
Output
main
pub(api) fn trimSuffix(suffix: str) -> str

Since. 1.0.0-beta

Parameters

NameType
suffixstr

Returns

str

Effects

none declared (pure unless the body says otherwise)

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

See also