TextHelper MembersKentico 8.0 API Reference
The TextHelper type exposes the following members.
Constructors

  NameDescription
Public methodTextHelper
Back to Top
Methods

  NameDescription
Public methodStatic memberBreakLine
Add specified break tag into the input text in specified index.
Public methodStatic memberBulkReplace
Performs bulk replace of given replacements
Public methodStatic memberContentEquals
Checks if two text contents are equal. Ignores extra white spaces, and is case insensitive.
Public methodStatic memberEncodeRegexSubstitutes
Encodes regex substitutions like $_, $+, ... so they don't apply as substitutes in the replacement string.
Public methodStatic memberEnsureHTMLLineEndings
Ensures the specified line endings in the given text.
Public methodStatic memberEnsureIndentation(String, Int32)
Ensures the specified line endings in the given text.
Public methodStatic memberEnsureIndentation(String, Int32, String)
Ensures the specified line endings in the given text.
Public methodStatic memberEnsureLineEndings
Ensures the specified line endings in the given text.
Public methodStatic memberEnsureMaximumLineLength(String, Int32)
Limits the line length of given plain text.
Public methodStatic memberEnsureMaximumLineLength(String, Int32, String, Boolean)
Limits the line length of given plain text.
Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Protected methodOnlineFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodStatic memberFirstLetterToUpper
Converts the first character to upper case.
Public methodStatic memberGetAmountText
If amount is equal to 1, expression using singular formatting string is returned, otherwise expression using plural formatting string is returned.
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Public methodStatic memberJoin
Joins the given list of values with a given separator.
Public methodStatic memberLimitFileNameLength
Limits the filename length (leaves extension).
Public methodStatic memberLimitLength(String, Int32, CutTextEnum)
Limits the string length.
Public methodStatic memberLimitLength(String, Int32, String, Boolean, CutTextEnum)
Limits the string length.
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodStatic memberMerge
Joins the given list of values with a given separator.
Public methodStatic memberMergeIfNotEmpty
Joins the given list of values with a given separator. Each value is inserted into the final string only if not empty.
Public methodStatic memberReduceWhiteSpaces
Replace whitespaces in input text to specified replacement.
Public methodStatic memberReformatCode(String)
Reformats the C# or JS code so it is properly indented.
Public methodStatic memberReformatCode(String, Int32)
Reformats the C# or JS code so it is properly indented.
Public methodStatic memberReformatCode(String, Int32, String)
Reformats the C# or JS code so it is properly indented.
Public methodStatic memberRemoveDiacritics
Removes diacritics from Latin characters, non-Latin characters are not changed.
Public methodStatic memberRemoveMultipleCommas
Removes multiple commas (i.e. transforms text "a,,b,," to "a, b").
Public methodStatic memberSetLine
Sets the specific line of the text to a new value
Public methodStatic memberSplitCamelCase
Splits the camel cased input text into separate words.
Public methodStatic memberSplitPages(String, Int32)
Returns an array of text pages created from the input string according to the page size.
Public methodStatic memberSplitPages(String, Int32, Boolean)
Returns an array of text pages created from the input string according to the page size.
Public methodOnlineToString
Returns a string that represents the current object.
(Inherited from OnlineObject.)
Public methodStatic memberToTitleCase
Converts the specified string to title case.
Public methodStatic memberTrimEndingWord
Removes specified word from the end of the text (if the text ends with the word). Note: Ignore case enabled.
Public methodStatic memberTrimNumberSuffix
Trims the number suffix from an identifier
Back to Top
Extension Methods

  NameDescription
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Back to Top
Fields

  NameDescription
Public fieldStatic memberDEFAULT_ELLIPSIS
Default ellipsis for the limit length methods.
Public fieldStatic memberNewLine
Newline symbol.
Back to Top
Properties

  NameDescription
Public propertyEncodeValues
Indicates whether to encode merged text.
Public propertyStatic memberRegeExWhiteSpaces
Regular expression for white spaces.
Public propertyStatic memberRegExLineBreak
Gets or sets the regular expression for line break method.
Public propertyStatic memberRegExLineEnd
Regular expression for the line ending.
Public propertyStatic memberRegExLineEndWithSpaces
Regular expression for the line ending with the spaces before and after.
Public propertyStatic memberRegExRemoveMultipleCommas
Regular expression to identify multiple occurrences of comma (surrounded by white space).
Public propertyStatic memberRegExRemoveMultipleCommasStartEnd
Regular expression to identify comma at the beginning and at the end of a text.
Public propertyStatic memberRegExSplitPagesSentences
Regular expression for the tag match for SplitPages method.
Public propertyStatic memberRegExSplitPagesTags
Regular expression for the tag match for SplitPages method.
Public propertyStatic memberRegExToTitleCaseWords
Regular expression for the word match for ToTitleCase method.
Back to Top
Events

  NameDescription
Public eventStatic memberOnBeforeRemoveDiacritics
Occurs when the RemoveDiacritics method is called, returns false if original remove method should not be used.
Back to Top
See Also