code: func bufApp(buf *[]byte, s string, w int, c byte) {
  	if *buf == nil {
  		if s[w] == c {
  			return
  		}
  
  		*buf = make([]byte, len(s))
  		copy(*buf, s[:w])
  	}
  	(*buf)[w] = c
  }
docs: // internal helper to lazily create a buffer if necessary.