Categorygithub.com/pborman/ansi
modulepackage
1.0.0
Repository: https://github.com/pborman/ansi.git
Documentation: pkg.go.dev

# Functions

Decode decodes the next sequence in in, returning the bytes following the sequence, the sequence s, and any possible error.
NewWriter returns a new Writer that maintains color and intensity.
Strip returns in with all ANSI escape sequences stripped.

# Constants

Acknowledge.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Application Program Command.
BI-DIRECTIONAL SUPPORT MODE.
Bell.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
bold or increased intensity.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Break Permitted Here.
Backspace.
Control Set 0 Announcer.
Control Set 1 Announcer.
Control Set 1 Announcer Alternate 1.
Control Set 1 Announcer Alternate 2.
Cancel.
Cursor Backward Tabulation.
Cancel Character.
Cursor Character Absolute.
Cursor Forward Tabulation.
Coding Method Delimiter.
Cursor Next Line.
Cursor Preceding Line.
Active Position Report.
Carriage Return.
CONTROL REPRESENTATION MODE.
Control Sequence Introducer.
Cursor Tabulation Control.
Cursor Left.
Cursor Down.
Cursor Right.
Cursor Position.
Cursor Up.
Cursor Line Tabulation.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
Device Attributes.
Define Area Qualification.
Device Control One.
Device Control Two.
Device Control Three.
Device Control Four.
Delete Character.
Device Control String.
DEVICE COMPONENT SELECT MODE.
default display colour (implementation-defined).
default background colour (implementation-defined).
Normal text color.
Normal text color and intensity.
Delete Line.
Data Link Escape.
Disable Manual Input.
SGR (SELECT GRAPHIC RENDITION) parameters.
Device Status Report.
Dimension Text Area.
Erase in Area.
Erase Character.
Erase in Page.
Erase in Field.
Erase in Line.
End of Medium.
Enable Manual Input.
SGR (SELECT GRAPHIC RENDITION) parameters.
Enquiry.
End of Transmission.
End of Guarded Area.
ERASURE MODE.
End of Selected Area.
Escape.
End of Transmission Block.
End of Text.
faint, decreased intensity or second colour.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
Preformated escape sequences for specific colors:.
SGR (SELECT GRAPHIC RENDITION) parameters.
FORMAT EFFECTOR ACTION MODE.
FORMAT EFFECTOR TRANSFER MODE.
Form Feed.
Function Key.
Font Selection.
SGR (SELECT GRAPHIC RENDITION) parameters.
GUARDED AREA TRANSFER MODE.
Graphic Character Combination.
fraktur.
GRAPHIC RENDITION COMBINATION.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
Graphic Size Modification.
Graphic Size Selection.
CHARACTER EDITING MODE.
SGR (SELECT GRAPHIC RENDITION) parameters.
Character Position Absolute.
Character Position Backward.
Character Position Forward.
Character Tabulation.
Character Tabulation With Justification.
Character Tabulation Set.
Character and Line Position.
Insert Character.
Identify Device Control String.
cancels the effect of the rendition aspects established by parameter values IdeogramUnderline to IdeogramStress.
ideogram double overline or double line on the left side.
ideogram double underline or double line on the right side.
ideogram overline or left side line.
ideogram stress marking.
ideogram underline or right side line.
Identify Graphic Subrepertoire.
Insert Line.
Interrupt.
SGR (SELECT GRAPHIC RENDITION) parameters.
INSERTION REPLACEMENT MODE.
Information Separator One (US - Unit Separator).
Information Separator Two (RS - Record Separator).
Information Separator Three (GS - Group Separator).
Information Separator Four (FS - File Separator).
SGR (SELECT GRAPHIC RENDITION) parameters.
Justify.
KEYBOARD ACTION MODE.
Line Feed.
Locking-Shift One Right.
Locking-Shift Two.
Locking-Shift Two Right.
Locking-Shift Three.
Locking-Shift Three Right.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
MULTIPLE AREA TRANSFER MODE.
Media Copy.
Message Waiting.
Negative Acknowledge.
No Break Here.
Next Line.
SGR (SELECT GRAPHIC RENDITION) parameters.
normal colour or normal intensity (neither bold nor faint).
Turn off all attributes.
NotEncircled.
Revealed.
Positive.
not italicized, not fraktur.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Next Page.
Null.
Operating System Command.
SGR (SELECT GRAPHIC RENDITION) parameters.
Presentation Expand or Contract.
Page Format Selection.
Partial Line Forward.
Partial Line Backward.
Privacy Message.
Preceding Page.
Page Position Absolute.
Page Position Backward.
Page Position Forward.
SGR (SELECT GRAPHIC RENDITION) parameters.
Parallel Texts.
Private Use One.
Private Use Two.
POSITIONING UNIT MODE (see F.4.1 in annex F).
Quad.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
Repeat.
reserved for proportional spacing as specified in CCITT Recommendation T.61.
intended for setting character foreground colour as specified in ISO 8613-6 [CCITT Recommendation T.416].
reserved for future standardization; intended for setting character background colour as specified in ISO 8613-6 [CCITT Recommendation T.416].
reserved for cancelling the effect of the rendering aspect established by parameter value 26.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Reverse Line Feed.
Reset to Initial State.
Reset Mode.
Set Additional Character Separation.
Select Alternative Presentation Variants.
SELECTED AREA TRANSFER MODE.
Single Character Introducer.
Select Character Orientation.
Select Character Path.
Set Character Spacing.
Scroll Down.
Start Directed String.
Select Editing Extent.
Sheet Eject and Feed.
Select Graphic Rendition.
Select Character Spacing.
Shift-In.
Select Implicit Movement Direction.
Scroll Left.
Set Line Home.
Set Line Limit.
Set Line Spacing.
Set Mode.
Shift-Out.
Start of Heading.
Start of String.
Start of Guarded Area.
Select Presentation Directions.
Set Page Home.
Spacing Increment.
Set Page Limit.
Select Print Quality and Rapidity.
Scroll Right.
Set Reduced Character Separation.
SEND/RECEIVE MODE.
Start Reversed String.
STATUS REPORT TRANSFER MODE.
Single-Shift Two.
Single-Shift Three.
Start of Selected Area.
Select Size Unit.
Set Space Width.
String Terminator.
Selective Tabulation.
not Blink or FastBlink.
SGR (SELECT GRAPHIC RENDITION) parameters.
Set Transmit State.
Start of Text.
Scroll Up.
Substitute.
Select Line Spacing.
Synchronous Idle.
Tabulation Aligned Centred.
Tabulation Aligned Leading Edge.
Tabulation Aligned Trailing Edge.
Tabulation Clear.
Tabulation Centred on Character.
TABULATION STOP MODE.
Tabulation Stop Remove.
Thin Space Specification.
TRANSFER TERMINATION MODE.
SGR (SELECT GRAPHIC RENDITION) parameters.
LINE EDITING MODE.
Line Position Absolute.
Line Position Backward.
Line Position Forward.
Line Tabulation.
Line Tabulation Set.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
SGR (SELECT GRAPHIC RENDITION) parameters.
SGR (SELECT GRAPHIC RENDITION) parameters.
Preformated escape sequences for specific colors:.
ZERO DEFAULT MODE (see F.4.2 in annex F).

# Variables

ACK is transmitted by a receiver as an affirmative response to the sender.
APC is used as the opening delimiter of a control string for application program use.
BEL is used when there is a need to call for attention; it may control alarm or attention devices.
BPH is used to indicate a point where a line break may occur when text is formatted.
BS causes the active data position to be moved one character position in the data component in the direction opposite to that of the implicit movement.
C0 is the 3-character escape sequence designating and invoking the C0 set.
C1 is the 3-character escape sequence designating and invoking the C1 set.
C1ALT1, according to Standard ECMA-35, announces the control functions of the C1 set are represented by ESC Fe sequences as in a 7-bit code.
C1LAT2 is an alternate 3-character escape sequence designating and invoking the C1 set.
CAN is used to indicate that the data preceding it in the data stream is in error.
CBT causes the active presentation position to be moved to the character position corresponding to the n-th preceding character tabulation stop in the presentation component, according to the character path, where n equals the value of Pn.
CCH is used to indicate that both the preceding graphic character in the data stream, (represented by one or more bit combinations) including SPACE, and the control function CCH itself are to be ignored for further interpretation of the data stream.
CHA causes the active presentation position to be moved to character position n in the active line in the presentation component, where n equals the value of Pn.
CHT causes the active presentation position to be moved to the character position corresponding to the n-th following character tabulation stop in the presentation component, according to the character path, where n equals the value of Pn.
CMD is used as the delimiter of a string of data coded according to Standard ECMA-35 and to switch to a general level of control.
CNL causes the active presentation position to be moved to the first character position of the n-th following line in the presentation component, where n equals the value of Pn.
CPL causes the active presentation position to be moved to the first character position of the n-th preceding line in the presentation component, where n equals the value of Pn.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, CPR is used to report the active presentation position of the sending device as residing in the presentation component at the n-th line position according to the line progression and at the m-th character position according to the character path, where n equals the value of Pn1 and m equals the value of Pn2.
The effect of CR depends on the setting of the DEVICE COMPONENT SELECT MODE (DCSM) and on the parameter value of SELECT IMPLICIT MOVEMENT DIRECTION (SIMD).
CSI is used as the first character of a control sequence, see 5.4.
CTC causes one or more tabulation stops to be set or cleared in the presentation component, depending on the parameter values: 0 a character tabulation stop is set at the active presentation position 1 a line tabulation stop is set at the active line (the line that contains the active presentation position) 2 the character tabulation stop at the active presentation position is cleared 3 the line tabulation stop at the active line is cleared 4 all character tabulation stops in the active line are cleared 5 all character tabulation stops are cleared 6 all line tabulation stops are cleared In the case of parameter values 0, 2 or 4 the number of lines affected depends on the setting of the TABULATION STOP MODE (TSM).
CUB causes the active presentation position to be moved leftwards in the presentation component by n character positions if the character path is horizontal, or by n line positions if the character path is vertical, where n equals the value of Pn.
CUD causes the active presentation position to be moved downwards in the presentation component by n line positions if the character path is horizontal, or by n character positions if the character path is vertical, where n equals the value of Pn.
CUF causes the active presentation position to be moved rightwards in the presentation component by n character positions if the character path is horizontal, or by n line positions if the character path is vertical, where n equals the value of Pn.
CUP causes the active presentation position to be moved in the presentation component to the n-th line position according to the line progression and to the m-th character position according to the character path, where n equals the value of Pn1 and m equals the value of Pn2.
CUU causes the active presentation position to be moved upwards in the presentation component by n line positions if the character path is horizontal, or by n character positions if the character path is vertical, where n equals the value of Pn.
CVT causes the active presentation position to be moved to the corresponding character position of the line corresponding to the n-th following line tabulation stop in the presentation component, where n equals the value of Pn.
With a parameter value not equal to 0, DA is used to identify the device which sends the DA.
DAQ is used to indicate that the active presentation position in the presentation component is the first character position of a qualified area.
DC1 is primarily intended for turning on or starting an ancillary device.
DC2 is primarily intended for turning on or starting an ancillary device.
DC3 is primarily intended for turning off or stopping an ancillary device.
DC4 is primarily intended for turning off, stopping or interrupting an ancillary device.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, DCH causes the contents of the active presentation position and, depending on the setting of the CHARACTER EDITING MODE (HEM), the contents of the n-1 preceding or following character positions to be removed from the presentation component, where n equals the value of Pn.
DCS is used as the opening delimiter of a control string for device control use.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, DL causes the contents of the active line (the line that contains the active presentation position) and, depending on the setting of the LINE EDITING MODE (VEM), the contents of the n-1 preceding or following lines to be removed from the presentation component, where n equals the value of Pn.
DLE is used exclusively to provide supplementary transmission control functions.
DMI causes the manual input facilities of a device to be disabled.
DSR is used either to report the status of the sending device or to request a status report from the receiving device, depending on the parameter values: 0 ready, no malfunction detected 1 busy, another DSR must be requested later 2 busy, another DSR will be sent later 3 some malfunction detected, another DSR must be requested later 4 some malfunction detected, another DSR will be sent later 5 a DSR is requested 6 a report of the active presentation position or of the active data position in the form of ACTIVE POSITION REPORT (CPR) is requested DSR with parameter value 0, 1, 2, 3 or 4 may be sent either unsolicited or as a response to a request such as a DSR with a parameter value 5 or MESSAGE WAITING (MW).
DTA is used to establish the dimensions of the text area for subsequent pages.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, EA causes some or all character positions in the active qualified area (the qualified area in the presentation component which contains the active presentation position) to be put into the erased state, depending on the parameter values: 0 the active presentation position and the character positions up to the end of the qualified area are put into the erased state 1 the character positions from the beginning of the qualified area up to and including the active presentation position are put into the erased state 2 all character positions of the qualified area are put into the erased state If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, EA causes some or all character positions in the active qualified area (the qualified area in the data component which contains the active data position) to be put into the erased state, depending on the parameter values: 0 the active data position and the character positions up to the end of the qualified area are put into the erased state 1 the character positions from the beginning of the qualified area up to and including the active data position are put into the erased state 2 all character positions of the qualified area are put into the erased state Whether the character positions of protected areas are put into the erased state, or the character positions of unprotected areas only, depends on the setting of the ERASURE MODE (ERM).
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, ECH causes the active presentation position and the n-1 following character positions in the presentation component to be put into the erased state, where n equals the value of Pn.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, ED causes some or all character positions of the active page (the page which contains the active presentation position in the presentation component) to be put into the erased state, depending on the parameter values: 0 the active presentation position and the character positions up to the end of the page are put into the erased state 1 the character positions from the beginning of the page up to and including the active presentation position are put into the erased state 2 all character positions of the page are put into the erased state If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, ED causes some or all character positions of the active page (the page which contains the active data position in the data component) to be put into the erased state, depending on the parameter values: 0 the active data position and the character positions up to the end of the page are put into the erased state 1 the character positions from the beginning of the page up to and including the active data position are put into the erased state 2 all character positions of the page are put into the erased state Whether the character positions of protected areas are put into the erased state, or the character positions of unprotected areas only, depends on the setting of the ERASURE MODE (ERM).
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, EF causes some or all character positions of the active field (the field which contains the active presentation position in the presentation component) to be put into the erased state, depending on the parameter values: 0 the active presentation position and the character positions up to the end of the field are put into the erased state 1 the character positions from the beginning of the field up to and including the active presentation position are put into the erased state 2 all character positions of the field are put into the erased state If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, EF causes some or all character positions of the active field (the field which contains the active data position in the data component) to be put into the erased state, depending on the parameter values: 0 the active data position and the character positions up to the end of the field are put into the erased state 1 the character positions from the beginning of the field up to and including the active data position are put into the erased state 2 all character positions of the field are put into the erased state Whether the character positions of protected areas are put into the erased state, or the character positions of unprotected areas only, depends on the setting of the ERASURE MODE (ERM).
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, EL causes some or all character positions of the active line (the line which contains the active presentation position in the presentation component) to be put into the erased state, depending on the parameter values: 0 the active presentation position and the character positions up to the end of the line are put into the erased state 1 the character positions from the beginning of the line up to and including the active presentation position are put into the erased state 2 all character positions of the line are put into the erased state If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, EL causes some or all character positions of the active line (the line which contains the active data position in the data component) to be put into the erased state, depending on the parameter values: 0 the active data position and the character positions up to the end of the line are put into the erased state 1 the character positions from the beginning of the line up to and including the active data position are put into the erased state 2 all character positions of the line are put into the erased state Whether the character positions of protected areas are put into the erased state, or the character positions of unprotected areas only, depends on the setting of the ERASURE MODE (ERM).
EM is used to identify the physical end of a medium, or the end of the used portion of a medium, or the end of the wanted portion of data recorded on a medium.
EMI is used to enable the manual input facilities of a device.
ENQ is transmitted by a sender as a request for a response from a receiver.
EOT is used to indicate the conclusion of the transmission of one or more texts.
EPA is used to indicate that the active presentation position is the last of a string of character positions in the presentation component, the contents of which are protected against manual alteration, are guarded against transmission or transfer, depending on the setting of the GUARDED AREA TRANSFER MODE (GATM), and may be protected against erasure, depending on the setting of the ERASURE MODE (ERM).
ESA is used to indicate that the active presentation position is the last of a string of character positions in the presentation component, the contents of which are eligible to be transmitted in the form of a data stream or transferred to an auxiliary input/output device.
ESC is used for code extension purposes.
ETB is used to indicate the end of a block of data where the data are divided into such blocks for transmission purposes.
ETX is used to indicate the end of a text.
Fixed error messages generated by package ansi.
FF causes the active presentation position to be moved to the corresponding character position of the line at the page home position of the next form or page in the presentation component.
FNK is a control function in which the parameter value identifies the function key which has been operated.
FNT is used to identify the character font to be selected as primary or alternative font by subsequent occurrences of SELECT GRAPHIC RENDITION (SGR) in the data stream.
Fixed error messages generated by package ansi.
GCC is used to indicate that two or more graphic characters are to be imaged as one single graphic symbol.
GSM is used to modify for subsequent text the height and/or the width of all primary and alternative fonts identified by FONT SELECTION (FNT) and established by GRAPHIC SIZE SELECTION (GSS).
GSS is used to establish for subsequent text the height and the width of all primary and alternative fonts identified by FONT SELECTION (FNT).
HPA causes the active data position to be moved to character position n in the active line (the line in the data component that contains the active data position), where n equals the value of Pn.
HPB causes the active data position to be moved by n character positions in the data component in the direction opposite to that of the character progression, where n equals the value of Pn.
HPR causes the active data position to be moved by n character positions in the data component in the direction of the character progression, where n equals the value of Pn.
HT causes the active presentation position to be moved to the following character tabulation stop in the presentation component.
HTJ causes the contents of the active field (the field in the presentation component that contains the active presentation position) to be shifted forward so that it ends at the character position preceding the following character tabulation stop.
HTS causes a character tabulation stop to be set at the active presentation position in the presentation component.
HVP causes the active data position to be moved in the data component to the n-th line position according to the line progression and to the m-th character position according to the character progression, where n equals the value of Pn1 and m equals the value of Pn2.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, ICH is used to prepare the insertion of n characters, by putting into the erased state the active presentation position and, depending on the setting of the CHARACTER EDITING MODE (HEM), the n-1 preceding or following character positions in the presentation component, where n equals the value of Pn.
IDCS is used to specify the purpose and format of the command string of subsequent DEVICE CONTROL STRINGs (DCS).
IGS is used to indicate that a repertoire of the graphic characters of ISO/IEC 10367 is used in the subsequent text.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, IL is used to prepare the insertion of n lines, by putting into the erased state in the presentation component the active line (the line that contains the active presentation position) and, depending on the setting of the LINE EDITING MODE (VEM), the n-1 preceding or following lines, where n equals the value of Pn.
Fixed error messages generated by package ansi.
INT is used to indicate to the receiving device that the current process is to be interrupted and an agreed procedure is to be initiated.
IS1 is used to separate and qualify data logically; its specific meaning has to be defined for each application.
IS2 is used to separate and qualify data logically; its specific meaning has to be defined for each application.
IS3 is used to separate and qualify data logically; its specific meaning has to be defined for each application.
IS4 is used to separate and qualify data logically; its specific meaning has to be defined for each application.
JFY is used to indicate the beginning of a string of graphic characters in the presentation component that are to be justified according to the layout specified by the parameter values, see annex C: 0 no justification, end of justification of preceding text 1 word fill 2 word space 3 letter space 4 hyphenation 5 flush to line home position margin 6 centre between line home position and line limit position margins 7 flush to line limit position margin 8 Italian hyphenation The end of the string to be justified is indicated by the next occurrence of JFY in the data stream.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, LF causes the active presentation position to be moved to the corresponding character position of the following line in the presentation component.
Fixed error messages generated by package ansi.
LS1R is used for code extension purposes.
LS2 is used for code extension purposes.
LS2R is used for code extension purposes.
LS3 is used for code extension purposes.
LS3R is used for code extension purposes.
MC is used either to initiate a transfer of data from or to an auxiliary input/output device or to enable or disable the relay of the received data stream to an auxiliary input/output device, depending on the parameter value: 0 initiate transfer to a primary auxiliary device 1 initiate transfer from a primary auxiliary device 2 initiate transfer to a secondary auxiliary device 3 initiate transfer from a secondary auxiliary device 4 stop relay to a primary auxiliary device 5 start relay to a primary auxiliary device 6 stop relay to a secondary auxiliary device 7 start relay to a secondary auxiliary device This control function may not be used to switch on or off an auxiliary device.
Fixed error messages generated by package ansi.
MW is used to set a message waiting indicator in the receiving device.
NAK is transmitted by a receiver as a negative response to the sender.
NBH is used to indicate a point where a line break shall not occur when text is formatted.
The effect of NEL depends on the setting of the DEVICE COMPONENT SELECT MODE (DCSM) and on the parameter value of SELECT IMPLICIT MOVEMENT DIRECTION (SIMD).
Fixed error messages generated by package ansi.
NP causes the n-th following page in the presentation component to be displayed, where n equals the value of Pn.
NUL is used for media-fill or time-fill.
OSC is used as the opening delimiter of a control string for operating system use.
PEC is used to establish the spacing and the extent of the graphic characters for subsequent text.
PFS is used to establish the available area for the imaging of pages of text based on paper size.
PLD causes the active presentation position to be moved in the presentation component to the corresponding position of an imaginary line with a partial offset in the direction of the line progression.
PLU causes the active presentation position to be moved in the presentation component to the corresponding position of an imaginary line with a partial offset in the direction opposite to that of the line progression.
PM is used as the opening delimiter of a control string for privacy message use.
PP causes the n-th preceding page in the presentation component to be displayed, where n equals the value of Pn.
PPA causes the active data position to be moved in the data component to the corresponding character position on the n-th page, where n equals the value of Pn.
PPB causes the active data position to be moved in the data component to the corresponding character position on the n-th preceding page, where n equals the value of Pn.
PPR causes the active data position to be moved in the data component to the corresponding character position on the n-th following page, where n equals the value of Pn.
PTX is used to delimit strings of graphic characters that are communicated one after another in the data stream but that are intended to be presented in parallel with one another, usually in adjacent lines.
PU1 is reserved for a function without standardized meaning for private use as required, subject to the prior agreement between the sender and the recipient of the data.
PU2 is reserved for a function without standardized meaning for private use as required, subject to the prior agreement between the sender and the recipient of the data.
QUAD is used to indicate the end of a string of graphic characters that are to be positioned on a single line according to the layout specified by the parameter values, see annex C: 0 flush to line home position margin 1 flush to line home position margin and fill with leader 2 centre between line home position and line limit position margins 3 centre between line home position and line limit position margins and fill with leader 4 flush to line limit position margin 5 flush to line limit position margin and fill with leader 6 flush to both margins The beginning of the string to be positioned is indicated by the preceding occurrence in the data stream of either QUAD or one of the following formator functions: FORM FEED (FF), CHARACTER AND LINE POSITION (HVP), LINE FEED (LF), NEXT LINE (NEL), PAGE POSITION ABSOLUTE (PPA), PAGE POSITION BACKWARD (PPB), PAGE POSITION FORWARD (PPR), REVERSE LINE FEED (RI), LINE POSITION ABSOLUTE (VPA), LINE POSITION BACKWARD (VPB), LINE POSITION FORWARD (VPR), or LINE TABULATION (VT).
REP is used to indicate that the preceding character in the data stream, if it is a graphic character (represented by one or more bit combinations) including SPACE, is to be repeated n times, where n equals the value of Pn.
If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, RI causes the active presentation position to be moved in the presentation component to the corresponding character position of the preceding line.
RIS causes a device to be reset to its initial state, i.e.
RM causes the modes of the receiving device to be reset as specified by the parameter values: 1 GUARDED AREA TRANSFER MODE (GATM) 2 KEYBOARD ACTION MODE (KAM) 3 CONTROL REPRESENTATION MODE (CRM) 4 INSERTION REPLACEMENT MODE (IRM) 5 STATUS REPORT TRANSFER MODE (SRTM) 6 ERASURE MODE (ERM) 7 LINE EDITING MODE (VEM) 8 BI-DIRECTIONAL SUPPORT MODE (BDSM) 9 DEVICE COMPONENT SELECT MODE (DCSM) 10 CHARACTER EDITING MODE (HEM) 11 POSITIONING UNIT MODE (PUM) (see F.4.1 in annex F) 12 SEND/RECEIVE MODE (SRM) 13 FORMAT EFFECTOR ACTION MODE (FEAM) 14 FORMAT EFFECTOR TRANSFER MODE (FETM) 15 MULTIPLE AREA TRANSFER MODE (MATM) 16 TRANSFER TERMINATION MODE (TTM) 17 SELECTED AREA TRANSFER MODE (SATM) 18 TABULATION STOP MODE (TSM) 19 (Shall not be used; see F.5.1 in annex F) 20 (Shall not be used; see F.5.2 in annex F) 21 GRAPHIC RENDITION COMBINATION MODE (GRCM) 22 ZERO DEFAULT MODE (ZDM) (see F.4.2 in annex F) NOTE Private modes may be implemented using private parameters, see 5.4.1 and 7.4.
SACS is used to establish extra inter-character escapement for subsequent text.
SAPV is used to specify one or more variants for the presentation of subsequent text.
SCI and the bit combination following it are used to represent a control function or a graphic character.
SCO is used to establish the amount of rotation of the graphic characters following in the data stream.
SCP is used to select the character path, relative to the line orientation, for the active line (the line that contains the active presentation position) and subsequent lines in the presentation component.
SCS is used to establish the character spacing for subsequent text.
SD causes the data in the presentation component to be moved by n line positions if the line orientation is horizontal, or by n character positions if the line orientation is vertical, such that the data appear to move down; where n equals the value of Pn.
SDS is used to establish in the data component the beginning and the end of a string of characters as well as the direction of the string.
SEE is used to establish the editing extent for subsequent character or line insertion or deletion.
SEF causes a sheet of paper to be ejected from a printing device into a specified output stacker and another sheet to be loaded into the printing device from a specified paper bin.
SGR is used to establish one or more graphic rendition aspects for subsequent text.
SHS is used to establish the character spacing for subsequent text.
SI is used for code extension purposes.
SIMD is used to select the direction of implicit movement of the data position relative to the character progression.
SL causes the data in the presentation component to be moved by n character positions if the line orientation is horizontal, or by n line positions if the line orientation is vertical, such that the data appear to move to the left; where n equals the value of Pn.
If the DEVICE COMPONENT SELECT MODE is set to PRESENTATION, SLH is used to establish at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component the position to which the active presentation position will be moved by subsequent occurrences of CARRIAGE RETURN (CR), DELETE LINE (DL), INSERT LINE (IL) or NEXT LINE (NEL) in the data stream; where n equals the value of Pn.
If the DEVICE COMPONENT SELECT MODE is set to PRESENTATION, SLL is used to establish at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component the position to which the active presentation position will be moved by subsequent occurrences of CARRIAGE RETURN (CR), or NEXT LINE (NEL) in the data stream if the parameter value of SELECT IMPLICIT MOVEMENT DIRECTION (SIMD) is equal to 1; where n equals the value of Pn.
SLS is used to establish the line spacing for subsequent text.
SM causes the modes of the receiving device to be set as specified by the parameter values: 1 GUARDED AREA TRANSFER MODE (GATM) 2 KEYBOARD ACTION MODE (KAM) 3 CONTROL REPRESENTATION MODE (CRM) 4 INSERTION REPLACEMENT MODE (IRM) 5 STATUS REPORT TRANSFER MODE (SRTM) 6 ERASURE MODE (ERM) 7 LINE EDITING MODE (VEM) 8 BI-DIRECTIONAL SUPPORT MODE (BDSM) 9 DEVICE COMPONENT SELECT MODE (DCSM) 10 CHARACTER EDITING MODE (HEM) 11 POSITIONING UNIT MODE (PUM) (see F.4.1 in annex F) 12 SEND/RECEIVE MODE (SRM) 13 FORMAT EFFECTOR ACTION MODE (FEAM) 14 FORMAT EFFECTOR TRANSFER MODE (FETM) 15 MULTIPLE AREA TRANSFER MODE (MATM) 16 TRANSFER TERMINATION MODE (TTM) 17 SELECTED AREA TRANSFER MODE (SATM) 18 TABULATION STOP MODE (TSM) 19 (Shall not be used; see F.5.1 in annex F) 20 (Shall not be used; see F.5.2 in annex F) 21 GRAPHIC RENDITION COMBINATION (GRCM) 22 ZERO DEFAULT MODE (ZDM) (see F.4.2 in annex F) NOTE Private modes may be implemented using private parameters, see 5.4.1 and 7.4.
SO is used for code extension purposes.
SOH is used to indicate the beginning of a heading.
SOS is used as the opening delimiter of a control string.
SPA is used to indicate that the active presentation position is the first of a string of character positions in the presentation component, the contents of which are protected against manual alteration, are guarded against transmission or transfer, depending on the setting of the GUARDED AREA TRANSFER MODE (GATM) and may be protected against erasure, depending on the setting of the ERASURE MODE (ERM).
SPD is used to select the line orientation, the line progression, and the character path in the presentation component.
Sepcials is a map of escape sequences to special processing functions.
If the DEVICE COMPONENT SELECT MODE is set to PRESENTATION, SPH is used to establish at line position n in the active page (the page that contains the active presentation position) and subsequent pages in the presentation component the position to which the active presentation position will be moved by subsequent occurrences of FORM FEED (FF) in the data stream; where n equals the value of Pn.
SPI is used to establish the line spacing and the character spacing for subsequent text.
If the DEVICE COMPONENT SELECT MODE is set to PRESENTATION, SPL is used to establish at line position n in the active page (the page that contains the active presentation position) and pages of subsequent text in the presentation component the position beyond which the active presentation position can normally not be moved; where n equals the value of Pn.
SPQR is used to select the relative print quality and the print speed for devices the output quality and speed of which are inversely related.
SR causes the data in the presentation component to be moved by n character positions if the line orientation is horizontal, or by n line positions if the line orientation is vertical, such that the data appear to move to the right; where n equals the value of Pn.
SRCS is used to establish reduced inter-character escapement for subsequent text.
SRS is used to establish in the data component the beginning and the end of a string of characters as well as the direction of the string.
SS2 is used for code extension purposes.
SS3 is used for code extension purposes.
SSA is used to indicate that the active presentation position is the first of a string of character positions in the presentation component, the contents of which are eligible to be transmitted in the form of a data stream or transferred to an auxiliary input/output device.
SSU is used to establish the unit in which the numeric parameters of certain control functions are expressed.
SSW is used to establish for subsequent text the character escapement associated with the character SPACE.
ST is used as the closing delimiter of a control string opened by APPLICATION PROGRAM COMMAND (APC), DEVICE CONTROL STRING (DCS), OPERATING SYSTEM COMMAND (OSC), PRIVACY MESSAGE (PM), or START OF STRING (SOS).
STAB causes subsequent text in the presentation component to be aligned according to the position and the properties of a tabulation stop which is selected from a list according to the value of the parameter Ps.
STS is used to establish the transmit state in the receiving device.
STX is used to indicate the beginning of a text and the end of a heading.
SU causes the data in the presentation component to be moved by n line positions if the line orientation is horizontal, or by n character positions if the line orientation is vertical, such that the data appear to move up; where n equals the value of Pn.
SUB is used in the place of a character that has been found to be invalid or in error.
SVS is used to establish the line spacing for subsequent text.
SYN is used by a synchronous transmission system in the absence of any other character (idle condition) to provide a signal from which synchronism may be achieved or retained between data terminal equipment.
Table maps escape sequence Names to the corresponding Sequence.
TAC causes a character tabulation stop calling for centring to be set at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component, where n equals the value of Pn.
TALE causes a character tabulation stop calling for leading edge alignment to be set at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component, where n equals the value of Pn.
TATE causes a character tabulation stop calling for trailing edge alignment to be set at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component, where n equals the value of Pn.
TBC causes one or more tabulation stops in the presentation component to be cleared, depending on the parameter value: 0 the character tabulation stop at the active presentation position is cleared 1 the line tabulation stop at the active line is cleared 2 all character tabulation stops in the active line are cleared 3 all character tabulation stops are cleared 4 all line tabulation stops are cleared 5 all tabulation stops are cleared In the case of parameter value 0 or 2 the number of lines affected depends on the setting of the TABULATION STOP MODE (TSM).
TCC causes a character tabulation stop calling for alignment of a target graphic character to be set at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component, where n equals the value of Pn1, and the target character about which centring is to be performed is specified by Pn2.
TSR causes any character tabulation stop at character position n in the active line (the line that contains the active presentation position) and lines of subsequent text in the presentation component to be cleared, but does not affect other tabulation stops.
TSS is used to establish the width of a thin space for subsequent text.
Fixed error messages generated by package ansi.
VPA causes the active data position to be moved to line position n in the data component in a direction parallel to the line progression, where n equals the value of Pn.
VPB causes the active data position to be moved by n line positions in the data component in a direction opposite to that of the line progression, where n equals the value of Pn.
VPR causes the active data position to be moved by n line positions in the data component in a direction parallel to the line progression, where n equals the value of Pn.
VT causes the active presentation position to be moved in the presentation component to the corresponding character position on the line at which the following line tabulation stop is set.
VTS causes a line tabulation stop to be set at the active line (the line that contains the active presentation position).

# Structs

An S contains a decoded escape sequence.
A Sequence specifies an ANSI (ECMA-48) Escape Sequence.
A Writer is an io.Writer that adjusts its graphics state, if necessary, before writing to the stream.

# Type aliases

A Name is the name of ansi escape sequence.