Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TrimRight (0.05 sec)

  1. 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 Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Sep 03 20:55:15 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  2. src/archive/tar/writer.go

    	tw.blk.reset()
    
    	// Best effort for the filename.
    	name = toASCII(name)
    	if len(name) > nameSize {
    		name = name[:nameSize]
    	}
    	name = strings.TrimRight(name, "/")
    
    	var f formatter
    	v7 := tw.blk.toV7()
    	v7.typeFlag()[0] = flag
    	f.formatString(v7.name(), name)
    	f.formatOctal(v7.mode(), 0)
    	f.formatOctal(v7.uid(), 0)
    	f.formatOctal(v7.gid(), 0)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 14:22:59 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top