strip_hz_control: Replace Horizontal Spacing Control Characters

Description Usage Arguments Details Value

View source: R/text.R

Description

Removes tabs, newlines, and manipulates the text so that it looks the same as it did with those horizontal control characters embedded. Currently carriage returns are also processed, but in the future they no longer will be. This function is used when the convert.hz.white.space parameter to the diff* methods is active. The term “strip” is a misnomer that remains for legacy reasons and lazyness.

Usage

1
strip_hz_control(txt, stops = 8L, sgr.supported)

Arguments

txt

character to covert

stops

integer, what tab stops to use

sgr.supported

logical whether the current display device supports ANSI CSI SGR. See diff*'s sgr.supported parameter.

Details

This is an internal function with exposed documentation because it is referenced in an external function's documentation.

Value

character, 'txt' with horizontal control sequences replaced.


diffobj documentation built on Oct. 5, 2021, 9:07 a.m.