method String.pushChar
Appends one character.
Example:
fn main() io {
var s = String.new()
s.pushChar('o')
s.pushChar('k')
print(s.freeze())
}Output
ok
Appends one character.
Example:
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
| Name | Type |
|---|---|
c | char |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/collections.oxl:1266