use entabber to not allocate.
entab
fn
auto entab(Range)(Range s, size_t tabSize = 8) if (isForwardRange!Range && isSomeChar!(ElementEncodingType!Range))Replaces spaces in s with the optimal number of tabs. All spaces and tabs at the end of a line are removed.
Parameters
s | String to convert. |
tabSize | Tab columns are tabSize spaces apart. |
Returns
GC allocated string with spaces replaced with tabs;
See Also
fn
auto entab(Range)(auto ref Range s, size_t tabSize = 8) if (!(isForwardRange!Range && isSomeChar!(ElementEncodingType!Range)) &&
is(StringTypeOf!Range))No documentation available for this declaration.