OxL Reference

method String.push

Appends the text s.

Example:

oxl✓ checked in CI
fn main() io {
  var s = String.new()
  s.push("a")
  s.push("bc")
  print(s.freeze())
}
Output
abc

Appends a string.

Example:

oxl✓ checked in CI
fn main() io {
  var s = String.new()
  s.push("a")
  s.push("bc")
  print(s.freeze())
}
Output
abc
pub(api) var fn push(s: str)

Complexity. O(len(s)) amortized.

Since. 1.0.0-beta

Parameters

NameType
sstr

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/collections.oxl:1235

See also