Extension Methods from Earljon Hidalgo
-
Truncate
Truncate the specified string based on the given length. Replaces the truncated data to "..."
-
HttpUtility Helpers
Make easily accessible some functions available in HttpUtility into an Extension.
-
ToProperCase
Converts string to a title case.
-
CreateDirectory
Recursively create directory based on the given path. If the given path doesn't exist, it will create until all the folders in the path are satisfied.
-
FirstDayOfMonth / LastDayOfMonth
Simple way to Get the first and last day of the specified date.
-
GetMD5
Gets the MD5 value of a given file.
-
WordCount
Count all words in a given string. Excludes whitespaces, tabs and line breaks.
-
FormatSize
Nicely formatted file size. This method will return file size with bytes, KB, MB and GB in it. You can use this alongside the Extension method named FileSize.
-
Strip
Strips unwanted characters on the specified string.
-
IsPalindrome
Checks to see if the given text is a valid palindrome or not.
-
FileSize
Get the file size of a given filename.
-
TrimDuplicates
Trims or removes duplicate delimited characters and leave only one instance of that character. If you like to have a comma delimited value and you like to remove excess commas, this extension method is for you. Other characters are supported too, this includes pipe and colon.
-
ListFiles
List/Get all files in a specified folder using LINQ. Doesn't include sub-directory files.
-
DeleteFiles
Delete all files found on the specified folder with a given file extension.
-
IsMobileValid
For Philippine mobile code but can also be adjusted based on your mobile network code. Check if the given number is a valid formatted international number.
-
FolderSize
Using LINQ, gets the total size of a specified folder. It can also check sizes of subdirectory under it as a parameter.