- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TrimRight (0.14 sec)
-
src/archive/tar/strconv.go
// in the V7 path field as a directory even though the full path // recorded elsewhere (e.g., via PAX record) contains no trailing slash. if len(s) > len(b) && b[len(b)-1] == '/' { n := len(strings.TrimRight(s[:len(b)-1], "/")) b[n] = 0 // Replace trailing slash with NUL terminator } } // fitsInBase256 reports whether x can be encoded into n bytes using base-256
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Sep 08 17:08:20 UTC 2025 - 9.1K bytes - Viewed (0) -
src/bytes/bytes.go
} s = s[n:] } if len(s) == 0 { // This is what we've historically done. return nil } return s } // TrimRight returns a subslice of s by slicing off all trailing // UTF-8-encoded code points that are contained in cutset. func TrimRight(s []byte, cutset string) []byte { if len(s) == 0 || cutset == "" { return s } if len(cutset) == 1 && cutset[0] < utf8.RuneSelf {
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 35.5K bytes - Viewed (0)