Four is the number of letters in the ...: Difference between revisions
Four is the number of letters in the ... (view source)
Revision as of 12:26, 27 June 2020
, 3 years agoRust - minor edit
(Added Rust solution) |
m (Rust - minor edit) |
||
Line 1,765:
fn append(&mut self, s: &str) {
let offset = self.string.len();
self.string.push_str(
self.words.push((offset, offset + s.len()));
}
Line 1,772:
let mut w = &mut self.words[len - 1];
w.1 += s.len();
self.string.push_str(
}
fn len(&self) -> usize {
|