C# Класс Minimod.PrettyText.PrettyTextMinimod

Minimod.PrettyText, Version 2.0.1, Copyright © Lars Corneliussen 2011

A minimod with string extensions, helping whereever you have to shape text to fit into a box.

Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License. http://www.apache.org/licenses/LICENSE-2.0
Показать файл Открыть проект

Открытые методы

Метод Описание
IndentBy ( this lines, int leadingSpaces ) : IEnumerable

Indents each line by specified number of spaces.

IndentBy ( this lines, int leadingSpaces, IndentOptions options ) : IEnumerable

Indents each line by specified number of spaces.

IndentLinesBy ( this lines, int leadingSpaces ) : string

Indents each line by specified number of spaces.

IndentLinesBy ( this lines, int leadingSpaces, IndentOptions options ) : string

Indents each line by specified number of spaces.

JoinLines ( this lines ) : string

Join lines by using Environment.NewLine.

ShortenTo ( this text, int length ) : string

Fits the text into length, appending ... if it is too long.

ShortenTo ( this text, int length, string hint ) : string

Fits the text into length, appending hint if it is too long.

SplitLines ( this input ) : IEnumerable

Splits into lines by using Environment.NewLine.

WrapAt ( this input, int margin ) : IEnumerable

Wraps lines exceeding a certain margin. For each line, the indentation is maintained.

based on: http://blueonionsoftware.com/blog.aspx?p=6091173d-6bdb-498c-9d57-c0da43319839

Приватные методы

Метод Описание
HasAnyFlag ( this value, Enum flags ) : bool copied from http://www.mmowned.com/forums/world-of-warcraft/bots-programs/memory-editing/297201-net-4-0-enum-hasflag-not-what-you-might-expect.html

Описание методов

IndentBy() публичный статический Метод

Indents each line by specified number of spaces.
public static IndentBy ( this lines, int leadingSpaces ) : IEnumerable
lines this
leadingSpaces int
Результат IEnumerable

IndentBy() публичный статический Метод

Indents each line by specified number of spaces.
public static IndentBy ( this lines, int leadingSpaces, IndentOptions options ) : IEnumerable
lines this
leadingSpaces int
options IndentOptions
Результат IEnumerable

IndentLinesBy() публичный статический Метод

Indents each line by specified number of spaces.
public static IndentLinesBy ( this lines, int leadingSpaces ) : string
lines this
leadingSpaces int
Результат string

IndentLinesBy() публичный статический Метод

Indents each line by specified number of spaces.
public static IndentLinesBy ( this lines, int leadingSpaces, IndentOptions options ) : string
lines this
leadingSpaces int
options IndentOptions
Результат string

JoinLines() публичный статический Метод

Join lines by using Environment.NewLine.
public static JoinLines ( this lines ) : string
lines this
Результат string

ShortenTo() публичный статический Метод

Fits the text into length, appending ... if it is too long.
public static ShortenTo ( this text, int length ) : string
text this
length int
Результат string

ShortenTo() публичный статический Метод

Fits the text into length, appending hint if it is too long.
public static ShortenTo ( this text, int length, string hint ) : string
text this
length int
hint string
Результат string

SplitLines() публичный статический Метод

Splits into lines by using Environment.NewLine.
public static SplitLines ( this input ) : IEnumerable
input this
Результат IEnumerable

WrapAt() публичный статический Метод

Wraps lines exceeding a certain margin. For each line, the indentation is maintained.
based on: http://blueonionsoftware.com/blog.aspx?p=6091173d-6bdb-498c-9d57-c0da43319839
public static WrapAt ( this input, int margin ) : IEnumerable
input this
margin int
Результат IEnumerable