feat(Str): Strict impemintation

Added method new() for creating empty string
This commit is contained in:
Black_Raven committed 2025-12-09 22:15:58 +03:00
1 parent 1c47dfc374
commit 2c9f81bf52
1 file changed
+17
+17
View File
@@ -12,3 +12,20 @@ pub struct Str {
_size: usize,
_capacity: usize,
}
impl Str {
pub fn new() -> Self {
Self {
_data: Vec::with_capacity(SIZE),
_stats: {
let mut data = Vec::new();
for i in 0..SIZE {
data.push(Status::FREE);
}
data
},
_size: 0,
_capacity: SIZE,
}
}
}