From efa7dace0e86d3c86538b40c2c79179dcf3907c4 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 16 Feb 2026 13:37:37 +0300 Subject: [PATCH] feat(string): Added method to push vector and 1 el to my string --- src/string/my_str_strict.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/string/my_str_strict.rs b/src/string/my_str_strict.rs index f38b317..1b3cab9 100644 --- a/src/string/my_str_strict.rs +++ b/src/string/my_str_strict.rs @@ -45,4 +45,18 @@ impl Str { self._data = data.to_vec(); self._size = data.len(); } + + pub fn push(&mut self, el: char) { + self._data.push(el); + self._size += 1; + self._stats[self._size - 1] = Status::BUISY; + } + + pub fn push_vec(&mut self, el: &Vec) { + for i in el { + self._data.push(*i); + self._size += 1; + self._stats[self._size - 1] = Status::BUISY; + } + } }