.net core extensions to help with repeating tasks on daily basis
Extensions included
- Reverse - change the order of the string
- IsPalindrome - check if string is the same bacwards and forwards
- GetByteArray - Get the byte represantation of the string
- ToTitleCase - Convert every words first letter to Upper Case
- CountOccurences - Number of occurences a text or character appears in another text
- WordCount - Number of words in a text
- ToBase64 - String to Base64
- FromBase64 - Base 64 back to normal string
- IsNumber - Check if a given text is a valid number
- Abrevation- Return the abrevation of a text (ex: My Programming Company => M.P.C)
- MaskLastXChars - Mask X number of characters from the end of the string (ex: mask email when showing them)
- MaskFirstXChars- Mask characters starting from the beggining
- MaskFirstAndLastXChars - Mask same number fo characters from the end and the beggining
- NumberOfVowels - Return vowel count
- WriteToDisk - Write file to disk
- LineCount - Count number of lines in a text
- Escape - Escape a string, when helpfull when you have to display a string with special characters.
- UnEscape - Unescape previously escaped string
- Similarity - See how much two texts are similar using the Levenshein Method
- IsEmail - Check if a value is a valid email
- ExtractEmail - Extracts a valid email from the text if it finds one
- GetQueryStringParamValue - Parse value from querystring parameters
- IsIPV4Address - Check if string is valid Ipv4 address
- IsIPV6Address - Check if string is valid ipv6 address
- ToEnum - Convert string to enum value for a given enum type
- IsGuid - Check if a text is a valid guid value
- IsValidUrl - Check if a text is a valid url
- ToSlug - Convert text to url slug(ex: article name to url. ArticleName:This is my article, ToSlug=>this_is_my_article)
- ToPlural - Convert words to plural ( won't work on every single word but in most cases)
- IsStrongPassword - Check if text is suitable for a strong password
- Evaluate - Evaluate string expression (ex: "2*(3+5)".Evalue()="16")
- ContainsAll - Check if text contains a list of words
- ContainsAny - Check if text contains any word in a given list
- LimitLength - Limit the length of a text to a given number, optional to put elipsis at the end (...)
- IsDate - Check if text is a valid date
- StripHtml - Remove html tags from text. Will remove tags only not the content between opening and closing tag
- ContainsHtml - Check if text contains html tags
- FileExists - Check if a file path exists on the disk
- DirectoryExists - Check if a directory path exists on the disk
- GetFileSize - Get the size of a file in the given path
- FormatWithObject - Format a string with an object using object property names( ex: {Name} is {Age} old and pass the object Stundent lets say as a parameter which has a Name and Age property, properties not found on the object will not be resolved.
- ToString - Convert list of strings to a string