Project Description
C# and VB.NET are great languages but they lack the highly abstracted string processing routines. I got inspired by the string library of Perl and Python. Although I never wrote a single program in
any of these two languages, I envisioned that if I can mimic them somehow without breaking C# style, they are going to be used by a lot of programmers. The library will have the following type
of methods
The API currently houses
General Substring Processing Routines
HTML/XML Tag Related Methods
Phonetic Algorithms like NYSICC, Soundex, Metaphone, Double Metaphone
Different Code Validity Checkers (Which are impossible to check using Regex)
String Distrance Metrices like Hamming distance calculation methods
I am releasing it early to see how people feel about it. I will include the following in the next release
Approximate String Matching Algorithms.
Some popular Hashing Algorithms.
Some methods in the API are listed below
Alphabets
Returns the alphabet of a given string
GenPass
Generates Random Password of given length
HammingDistance
Returns the Hamming distance between two strings
LevenshteinDistance
Returns the Levenshtein Distance between two strings
NeedleManDistance
Returns the NeedleManDistance between two strings
IsUpperCase
Returns true if the passed argument character is Upper Case
InitialUpperCase
Returns the argument string after making the initial letter capitalized.
ToggleCase
Toggles the case of the argument string
SentenceCase
A special wrapper of InitialUpperCase where the delimiter is hard coded as . (read period)
This returns the justified sentence of the given string.
IsAnagram
Returns true if the strings are anagram of one another. Else return false.
IsCComment
Returns true if the string argument is a valid C style comment (/* this is a valid C Style Comment */)
IsCPPComment
Returns true if the string argument is a valid CPP/Java Style Comment
IsPalindrome
Returns true if the argument string is a palindromic word/phrase/sentence. Ignores characters. "Madam I'm Adam" is a palindrome.
IsSameSoundex
Returns true if the soundex codes of both the argument strings are same.
IsSameLevenshtein
Returns true if the levenshtein distance of two strings from a third one is same. Takes 3 strings.
IsValidIdentifier
Returns true if the argument is a valid C Family Language (C,C,Java,C#,Python,Perl) identifier name else
returns false.
IsVBComment
Returns true if the argument string is a valid VB comment.
IsValidUPC
Returns true if the string argument is a valid Universal Product Code, else returns false.
IsValidISBN
Returns true if the string argument is a valid 10 digit ISBN. It doesn't work for ISBN 13 as of now.
IsValidSIN
Returns true if the argument string is a valid Social Insurance Number (SIN) of a canadian citizen.
IsVowel
Returns true if the argument character is a vowel.
NYSIIS
Returns NYSIIS phonetic code of the argument string.
Soundex
Returns the Soundex code of the argument string.
StripConsecutiveRepeatChars
Does exactly what the name says.
StripRepeatChars
Makes the characters unique in a string. Kind of similar to alphabet
StripTags
Strips any Mark Up tags from the argument string.