Property | Type | Description | |
---|---|---|---|
IndentLevel | int | ||
IndentString | string | ||
LineNo | int | ||
NewlineString | string | ||
S | StringBuilder |
Method | Description | |
---|---|---|
Append ( string s ) : StringBuilder | ||
CommitNewlines ( ) : int | ||
Dedent ( ) : void | ||
GetCheckpoint ( ) : Checkpoint | ||
Indent ( ) : void | ||
Newline ( int changeIndentLevel ) : Checkpoint |
Writes a newline and the appropriate amount of indentation afterward. Note that "revoking" a newline does NOT restore the original indent level. |
|
PrinterState ( StringBuilder s, string indent = "\t", string newline = "\n" ) : System | ||
RevokeNewlinesSince ( Checkpoint cp ) : int | ||
RevokeOrCommitNewlines ( Checkpoint cp, int maxLineWidth ) : int |
Revokes or commits newlines added since the specified checkpoint. Recent newlines are revoked if the combined line length after revokation does not exceed This method does not affect the indent level. |
Method | Description | |
---|---|---|
Revoke ( Revokable r ) : void |
Revokes (deletes) the last newline created, and its indent. Only the most recent newline can be revoked, and of course, it can only be revoked once. Multiple newlines can be revoked if they are revoked in the reverse order in which they were created. |
|
RevokeNewlinesStartingAtIndex ( int i0 ) : int |
public Newline ( int changeIndentLevel ) : Checkpoint | ||
changeIndentLevel | int | Amount by which to change |
return | Checkpoint |
public PrinterState ( StringBuilder s, string indent = "\t", string newline = "\n" ) : System | ||
s | StringBuilder | |
indent | string | |
newline | string | |
return | System |
public RevokeNewlinesSince ( Checkpoint cp ) : int | ||
cp | Checkpoint | |
return | int |
public RevokeOrCommitNewlines ( Checkpoint cp, int maxLineWidth ) : int | ||
cp | Checkpoint | |
maxLineWidth | int | |
return | int |