You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: buffer.go
    path of file: ./repos/streamdal/apps/cli/vendor/github.com/muesli/reflow/ansi
    
    the code of the file until where you have to start completion: package ansi

import (
	"bytes"

	"github.com/mattn/go-runewidth"
)

// Buffer is a buffer aware of ANSI esca
    
func PrintableRuneWidth(s string) int {
	var n int
	var ansi bool

	for _, c := range s {
		if c == Marker {
			// ANSI escape sequence
			ansi = true
		} else if ansi {
			if IsTerminator(c) {
				// ANSI sequence terminated
				ansi = false
			}
		} else {
			n += runewidth.RuneWidth(c)
		}
	}

	return n
}