]>
git.proxmox.com Git - proxmox-backup.git/blob - pbs-tools/src/str.rs
1 //! String related utilities.
3 pub fn strip_ascii_whitespace(line
: &[u8]) -> &[u8] {
4 let line
= match line
.iter().position(|&b
| !b
.is_ascii_whitespace()) {
8 match line
.iter().rev().position(|&b
| !b
.is_ascii_whitespace()) {
9 Some(n
) => &line
[..(line
.len() - n
)],