Skip to content

Instantly share code, notes, and snippets.

View import-yuefeng's full-sized avatar
🤠
今天你为乌干达儿童捐款了吗?

Yuefeng Zhu import-yuefeng

🤠
今天你为乌干达儿童捐款了吗?
View GitHub Profile
@import-yuefeng
import-yuefeng / string-conversion.rs
Created May 14, 2021 05:13 — forked from jimmychu0807/string-conversion.rs
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: