def METHOD_NAME(string, count, line=0, col=0, tabs=1):
    pos = 0
    while True:
        p = string.find('\n', pos, count) + 1
        if not p:
            break
        pos = p
        line += 1
        col = 0
    if tabs != 1:
        lastline = (" " * col) + string[pos:count]
        lastline = lastline.expandtabs(tabs)
        col = len(lastline)
    else:
        col += count - pos
    return (line, col)