code: func write(emitter *yaml_emitter_t, s []byte, i *int) bool {
  	if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) {
  		return false
  	}
  	p := emitter.buffer_pos
  	w := width(s[*i])
  	switch w {
  	case 4:
  		emitter.buffer[p+3] = s[*i+3]
  		fallthrough
  	case 3:
  		emitter.buffer[p+2] = s[*i+2]
  		fallthrough
  	case 2:
  		emitter.buffer[p+1] = s[*i+1]
  		fallthrough
  	case 1:
  		emitter.buffer[p+0] = s[*i+0]
  	default:
  		panic("unknown character width")
  	}
  	emitter.column++
  	emitter.buffer_pos += w
  	*i += w
  	return true
  }
docs: // Copy a character from a string into buffer.