detabber

Replace each tab character in r with the number of spaces necessary to align the following character at the next tab stop.

detabber
(
Range
)
(
Range r
,
size_t tabSize = 8
)

Parameters

r Range

string or forward range

tabSize size_t

distance between tab stops

Return Value

Type: auto

lazy forward range with tabs replaced with spaces

Examples

import std.array : array;

assert(detabber(" \n\tx", 9).array == " \n         x");
Suggestion Box / Bug Report