C# Класс clipr.Utils.StringExtensions

Показать файл Открыть проект

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

Метод Описание
Reflow ( this text, int maxChars ) : IEnumerable

Strip all newlines from the input string, then return chunks of text of at most maxChars characters.

ReflowWords ( this text, int maxChars ) : IEnumerable

Strip all newlines from the input string, then return chunks of text of at most maxChars characters.

If a word (defined as consecutive characters that aren't spaces or tabs) is being split, the line will return up to the last whole word. If a word's length is longer than maxChars, it will be forced to split across multiple lines.

If multiple separator characters occur at a line boundary, they will be removed.

ReflowWords ( this text, int maxChars, char separators ) : IEnumerable

Strip all newlines from the input string, then return chunks of text of at most maxChars characters.

If a word (defined as consecutive characters that aren't given in separators) is being split, the line will return up to the last whole word. If a word's length is longer than maxChars, it will be forced to split across multiple lines.

If multiple separator characters occur at a line boundary, they will be removed.

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

Метод Описание
FindNextNonSeparator ( string text, int start, char seps ) : int
FindPreviousNonSeparator ( string text, int start, int end, char seps ) : int
FindPreviousSeparator ( string text, int start, int end, char seps ) : int

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

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

Strip all newlines from the input string, then return chunks of text of at most maxChars characters.

public static Reflow ( this text, int maxChars ) : IEnumerable
text this String to reflow.
maxChars int Maximum number of characters per line.
Результат IEnumerable

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

Strip all newlines from the input string, then return chunks of text of at most maxChars characters.

If a word (defined as consecutive characters that aren't spaces or tabs) is being split, the line will return up to the last whole word. If a word's length is longer than maxChars, it will be forced to split across multiple lines.

If multiple separator characters occur at a line boundary, they will be removed.

public static ReflowWords ( this text, int maxChars ) : IEnumerable
text this String to reflow.
maxChars int Maximum number of characters per line.
Результат IEnumerable

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

Strip all newlines from the input string, then return chunks of text of at most maxChars characters.

If a word (defined as consecutive characters that aren't given in separators) is being split, the line will return up to the last whole word. If a word's length is longer than maxChars, it will be forced to split across multiple lines.

If multiple separator characters occur at a line boundary, they will be removed.

public static ReflowWords ( this text, int maxChars, char separators ) : IEnumerable
text this String to reflow.
maxChars int Maximum number of characters per line.
separators char Array of valid separator characters.
Результат IEnumerable