08-12-2016 02:22 PM
@Darren wrote:Here's another silly way to do it:
08-12-2016 03:08 PM
@GregFreeman wrote:What if I meant to type "ThisIsn't" as my string but i missed a couple characters. I'll get a match and it will be for the wrong item, when what I really want is it to match neither item.
Here is the problem: what if I ordered my enum differently so "ThisIsn't" was first. Then scan from string would return that item. Reordering my enum could completely change the functionality of my program.
Yeah, that is an issue, and a troublesome one. Would be nice to have an exact string and perhaps case insensitive format specifier, something like %+s matches exact string and %-s ignores case. (I selected + and - since they are already used for numeric specifiers, so are normally used already)