F# String extension methods rather than using RegEx

In my previous post I talked about some extension methods for string checking: http://blogs.msdn.com/b/carlnol/archive/2011/10/19/string-extension-methods-rather-than-using-regex.aspx But what would be a post if there was not a F# equivalent. Interestingly the ability to perform checks on each character in a string is actually already supported by F#; using the String.forall: String.forall Char.IsLetter "AO" However, one can also…

0

String extension methods rather than using RegEx

In a recent project I was using regular expressions a lot for validating string expressions such that statements like the following were true: Must be all characters Must be all alphanumeric’s and be of length 6 Must be all numeric digits (e.g. “3648”) Must be all upper case characters However in reflection the char data…

0