OxL Reference

method String.pushChar

Appends one character.

Example:

oxl✓ checked in CI
fn main() io {
  var s = String.new()
  s.pushChar('o')
  s.pushChar('k')
  print(s.freeze())
}
Output
ok

Appends one character.

Example:

oxl✓ checked in CI
fn main() io {
  var s = String.new()
  s.pushChar('x')
  s.pushChar('y')
  print(s.freeze())
}
Output
xy
pub(api) var fn pushChar(c: char)

Complexity. O(1) amortized.

Since. 1.0.0-beta

Parameters

NameType
cchar

Effects

none declared (pure unless the body says otherwise)

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

See also