TTabCairn
Product

Product features · Logical tab-stop columns

01

Count single-line logical columns using fixed tab stops and one column per other Unicode code point.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Logical tab-stop columns

● ● ●TabCairn●
A concrete starting point · Logical tab-stop columns ×
def logical_column(text, tab_width):
    if not isinstance(text, str):
        raise ValueError("text.required")
    if type(tab_width) is not int or tab_width <= 0:
        raise ValueError("tab.width")
    if "\r" in text or "\n" in text:
        raise ValueError("line.break")
    column = 0
    for char in text:
        column += tab_width - column % tab_width if char == "\t" else 1
    return column
✳Count single-line logical columns using fixed tab stops and one column per other Unicode code point.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗