Help functions for Rust about string