OxL Reference

method str.trimStart

The text without leading whitespace.

Example:

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

Removes whitespace at the start.

Example:

oxl✓ checked in CI
fn main() io {
  print("[{"  hi ".trimStart()}]")
}
Output
[hi ]
pub(api) fn trimStart() -> 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:428

See also