The TextHelper type exposes the following members.
Back to Top
Back to Top
Back to Top
Back to Top
Back to Top
Back to Top
Constructors
Name | Description | |
---|---|---|
TextHelper |
Methods
Name | Description | |
---|---|---|
BreakLine |
Add specified break tag into the input text in specified index.
| |
BulkReplace |
Performs bulk replace of given replacements
| |
ContentEquals |
Checks if two text contents are equal. Ignores extra white spaces, and is case insensitive.
| |
EncodeRegexSubstitutes |
Encodes regex substitutions like $_, $+, ... so they don't apply as substitutes in the replacement string.
| |
EnsureHTMLLineEndings |
Ensures the specified line endings in the given text.
| |
EnsureIndentation(String, Int32) |
Ensures the specified line endings in the given text.
| |
EnsureIndentation(String, Int32, String) |
Ensures the specified line endings in the given text.
| |
EnsureLineEndings |
Ensures the specified line endings in the given text.
| |
EnsureMaximumLineLength(String, Int32) |
Limits the line length of given plain text.
| |
EnsureMaximumLineLength(String, Int32, String, Boolean) |
Limits the line length of given plain text.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FirstLetterToUpper |
Converts the first character to upper case.
| |
GetAmountText |
If amount is equal to 1, expression using singular formatting string is returned, otherwise expression using plural formatting string is returned.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Join |
Joins the given list of values with a given separator.
| |
LimitFileNameLength |
Limits the filename length (leaves extension).
| |
LimitLength(String, Int32, CutTextEnum) |
Limits the string length.
| |
LimitLength(String, Int32, String, Boolean, CutTextEnum) |
Limits the string length.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Merge |
Joins the given list of values with a given separator.
| |
MergeIfNotEmpty |
Joins the given list of values with a given separator. Each value is inserted into the final string only if not empty.
| |
ReduceWhiteSpaces |
Replace whitespaces in input text to specified replacement.
| |
ReformatCode(String) |
Reformats the C# or JS code so it is properly indented.
| |
ReformatCode(String, Int32) |
Reformats the C# or JS code so it is properly indented.
| |
ReformatCode(String, Int32, String) |
Reformats the C# or JS code so it is properly indented.
| |
RemoveDiacritics |
Removes diacritics from Latin characters, non-Latin characters are not changed.
| |
RemoveMultipleCommas |
Removes multiple commas (i.e. transforms text "a,,b,," to "a, b").
| |
SetLine |
Sets the specific line of the text to a new value
| |
SplitCamelCase |
Splits the camel cased input text into separate words.
| |
SplitPages(String, Int32) |
Returns an array of text pages created from the input string according to the page size.
| |
SplitPages(String, Int32, Boolean) |
Returns an array of text pages created from the input string according to the page size.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
ToTitleCase |
Converts the specified string to title case.
| |
TrimEndingWord |
Removes specified word from the end of the text (if the text ends with the word).
Note: Ignore case enabled.
| |
TrimNumberSuffix |
Trims the number suffix from an identifier
|
Extension Methods
Name | Description | |
---|---|---|
AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |
Fields
Name | Description | |
---|---|---|
DEFAULT_ELLIPSIS |
Default ellipsis for the limit length methods.
| |
NewLine |
Newline symbol.
|
Properties
Name | Description | |
---|---|---|
EncodeValues |
Indicates whether to encode merged text.
| |
RegeExWhiteSpaces |
Regular expression for white spaces.
| |
RegExLineBreak |
Gets or sets the regular expression for line break method.
| |
RegExLineEnd |
Regular expression for the line ending.
| |
RegExLineEndWithSpaces |
Regular expression for the line ending with the spaces before and after.
| |
RegExRemoveMultipleCommas |
Regular expression to identify multiple occurrences of comma (surrounded by white space).
| |
RegExRemoveMultipleCommasStartEnd |
Regular expression to identify comma at the beginning and at the end of a text.
| |
RegExSplitPagesSentences |
Regular expression for the tag match for SplitPages method.
| |
RegExSplitPagesTags |
Regular expression for the tag match for SplitPages method.
| |
RegExToTitleCaseWords |
Regular expression for the word match for ToTitleCase method.
|
Events
Name | Description | |
---|---|---|
OnBeforeRemoveDiacritics |
Occurs when the RemoveDiacritics method is called, returns false if original remove method should not be used.
|
See Also