Show / Hide Table of Contents

Class LineWrapUtilities

Inheritance
object
LineWrapUtilities
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.CommandsFramework
Assembly: Benday.CommandsFramework.dll
Syntax
public static class LineWrapUtilities

Methods

| Edit this page View Source

AppendWithPadding(StringBuilder, string, int)

Appends a value to the string builder with trailing space padding

Declaration
public static void AppendWithPadding(this StringBuilder builder, string value, int padToLength)
Parameters
Type Name Description
StringBuilder builder

String builder to append to

string value

Value to append

int padToLength

Length to make the value

| Edit this page View Source

AppendWrappedValue(StringBuilder, string, int, int)

Appends a wrapped description value for command usages and argument usages

Declaration
public static void AppendWrappedValue(this StringBuilder builder, string valueToWrap, int maxLineLength, int commandNameColumnWidth)
Parameters
Type Name Description
StringBuilder builder

String builder instance to append value to

string valueToWrap

Value to wrap. This is probably the description value.

int maxLineLength

Max length of the line

int commandNameColumnWidth

Arg or command name column width

| Edit this page View Source

GetValueWithPadding(string, int)

Gets a string value with trailing space padding

Declaration
public static string GetValueWithPadding(string value, int padToLength)
Parameters
Type Name Description
string value

Value to pad

int padToLength

Desired length after padding

Returns
Type Description
string
| Edit this page View Source

WrapValue(int, int, string)

Wraps the input value into multiple lines if needed.

Declaration
public static string WrapValue(int linePadding, int maxLineLength, string input)
Parameters
Type Name Description
int linePadding

Number of spaces at the start of each wrapped line

int maxLineLength

Max length for each line including the value and padding

string input

Value to wrap

Returns
Type Description
string

Wrapped value

  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com