Skip to content

T_CommandLine_Text_TextWrapper

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

TextWrapper Class

A utility class to word-wrap and indent blocks of text

Inheritance Hierarchy

System.Object
  CommandLine.Text.TextWrapper
Namespace: CommandLine.Text
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public class TextWrapper

VB

Public Class TextWrapper

C++

public ref class TextWrapper

F#

type TextWrapper =  class end

The TextWrapper type exposes the following members.

Constructors

 

Name Description
Public method TextWrapper Initializes a new instance of the TextWrapper class
  Back to Top

Methods

 

Name Description
Private methodStatic member AddWordToLastLineOrCreateNewLineIfNecessary When presented with a word, either append to the last line in the list or start a new line
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Indent Indent all lines in the TextWrapper by the desired number of spaces
Private methodStatic member LeftString Return the left part of a string in a way that compensates for Substring's deficiencies
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Private methodStatic member RightString Return the right part of a string in a way that compensates for Substring's deficiencies
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method ToText Returns the current state of the TextWrapper as a string
Public method WordWrap Splits a string into a words and performs wrapping while also preserving line-breaks and sub-indentation
Private method WordWrapLine
Public methodStatic member WrapAndIndentText Convenience method to wraps and indent a string in a single operation
  Back to Top

Extension Methods

 

Name Description
Private Extension Method IsEmpty (Defined by UnParserExtensions.)
Private Extension Method NormalizeValue (Defined by UnParserExtensions.)
  Back to Top

See Also

Reference

CommandLine.Text Namespace

Clone this wiki locally