Shunde.NET Framework Class Library

TextUtils Methods

The methods of the TextUtils class are listed below. For a complete list of TextUtils class members, see the TextUtils Members topic.

Public Static Methods

AppendNameValueToUrlAppends a Name and Value pair to a URL
AreSameDayReturns true if 2 date times are on the same day
AreSameTimeReturns true if 2 date times have the same Hour and Minute values
CutTextCuts a string to end at the end of a word. It appends "..." to the end if the text is cut (that is, if length is greater than the length of the string).
GetExceptionReportAsHtmlGets a diagnostic report of an exception
GetFriendlyDateGets the textual representation of a date in a "friendly" format, using the specified month and year formats. If the time is not midnight, then the time is included
GetFriendlyDateRangeGets, as text, the start and end date and time for a start date and end date using the format strings for the month and year
GetFriendlyFileSizeConverts a number of bytes into a friendly Name, such as 603 bytes, 14 KB, 1,048 MB etc
GetNoiseWords Creates a dictionary containing all the words in the noise file
GetOrdinalSuffixGets a number as an ordered number, if you know what I mean. For example, converts 1 to "1st" or 2 to "2nd"
IsMidnightReturns true if the time is midnight
IsValidEmailAddressChecks to see if a string is a valid email address. A valid email address is at least 5 characters, and has an '@' and a '.' in it
JavascriptStringEncodeConverts a string so that it can be used as a javascript string
MakeFriendlyConverts a string in camel format suchAsThis into a string Such As This
ParseStringForFullTextSearchOverloaded. Parses a string so that it is suitable for a CONTAINSTABLE query
RemoveIllegalCharactersFromFilename Removes illegal characters, such as ':' and '\' from filenames
RemoveNonAlphaNumericStrips a string of all but the alpha-numeric characters
RemoveNonNumericStrips a string of all but the numeric characters
ToHtml Converts a string's line breaks into Html line breaks

Public Instance Methods

Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

TextUtils Class | Shunde.Utilities Namespace