'>>> b = Buffer()
>>> b.add(\'asdf\')
>>> b.add(\'qwert\')
>>> b.index(\'t\') == len(b) - 1
True'

def index(self, x):

    sofar = 0
    for b in self.data:
        if (x in b):
            return (sofar + b.index(x))
        sofar += len(b)
    raise IndexError()
