def increment(state):
    """
    postcondition: `state.pos` is incremented, unless `state.pos` was already at least
        `len(state.text)`
    returns: the character at `state.text[state.pos]`, or the empty string if `state.pos`
        was not incremented
    """
    if not state.finished():
        state.pos += 1
        return state.text[state.pos - 1 : state.pos]
    return ""