ggstd 0.1.0

Partial implementation of Go standard library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2023 The rust-ggstd authors.
// SPDX-License-Identifier: 0BSD

use ggstd::bytes::Buffer;

use std::io::Write;

fn main() {
    let mut buf = Buffer::new();
    buf.write_all("hello world".as_bytes()).unwrap();
    println!("{}", buf.string());

    let mut buf = Buffer::new();
    buf.write_byte(33).unwrap();
    buf.write_all("hello world".as_bytes()).unwrap();
    println!("{}", buf.read_byte().unwrap());
    println!("{}", buf.string());
}