pub fn TrimRight(s: &[byte], cutset: impl AsRef<[byte]>) -> &[byte] ⓘExpand description
TrimRight returns a subslice of s by slicing off all trailing UTF-8-encoded code points that are contained in cutset.
zh-cn
返回将s后端所有cutset包含的unicode码值都去掉的子切片。§Example
use gostd_bytes as bytes;
assert_eq!("¡¡¡Hello, Gophers".as_bytes(),bytes::TrimRight("¡¡¡Hello, Gophers!!!".as_bytes(), "!¡".as_bytes()));