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#

publicclass TextWrapper

VB

PublicClassTextWrapper

C++

public ref classTextWrapper

F#

typeTextWrapper=classend

The TextWrapper type exposes the following members.

Constructors

NameDescription
Public methodTextWrapper Initializes a new instance of the TextWrapper class
Back to Top

Methods

NameDescription
Private methodStatic memberAddWordToLastLineOrCreateNewLineIfNecessary When presented with a word, either append to the last line in the list or start a new line
Public methodEquals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCode Serves as the default hash function. (Inherited from Object.)
Public methodGetType Gets the Type of the current instance. (Inherited from Object.)
Public methodIndent Indent all lines in the TextWrapper by the desired number of spaces
Private methodStatic memberLeftString Return the left part of a string in a way that compensates for Substring's deficiencies
Protected methodMemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Private methodStatic memberRightString Return the right part of a string in a way that compensates for Substring's deficiencies
Public methodToString Returns a string that represents the current object. (Inherited from Object.)
Public methodToText Returns the current state of the TextWrapper as a string
Public methodWordWrap Splits a string into a words and performs wrapping while also preserving line-breaks and sub-indentation
Private methodWordWrapLine
Public methodStatic memberWrapAndIndentText Convenience method to wraps and indent a string in a single operation
Back to Top

Extension Methods

NameDescription
Private Extension MethodIsEmpty (Defined by UnParserExtensions.)
Private Extension MethodNormalizeValue (Defined by UnParserExtensions.)
Back to Top

See Also

Reference

CommandLine.Text Namespace

Clone this wiki locally