OxL Reference

method str.trimEnd

The text without trailing whitespace.

Example:

oxl✓ checked in CI
fn main() io {
  print("[{"  padded  ".trimEnd()}]")
}
Output
[  padded]

Removes whitespace at the end.

Example:

oxl✓ checked in CI
fn main() io {
  print("[{"  hi ".trimEnd()}]")
}
Output
[  hi]
pub(api) fn trimEnd() -> str

Complexity. O(n).

Since. 1.0.0-beta

Returns

str

Effects

none declared (pure unless the body says otherwise)

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

See also