Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for WriteStringPad (0.19 sec)

  1. src/cmd/link/internal/ld/outbuf.go

    // If n is larger than len(s) then it is padded with zero bytes.
    func (out *OutBuf) WriteStringN(s string, n int) {
    	out.WriteStringPad(s, n, zeros[:])
    }
    
    // WriteStringPad writes the first n bytes of s.
    // If n is larger than len(s) then it is padded with the bytes in pad (repeated as needed).
    func (out *OutBuf) WriteStringPad(s string, n int, pad []byte) {
    	if len(s) >= n {
    		out.WriteString(s[:n])
    	} else {
    		out.WriteString(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
Back to top