I want to write a function that will return a FontStyle and take a string as a parameter
FontStyle f = function ("Italic");
I do not want to write a Switch statement or if else do the same.
Can this be done for case-insensitive strings?
FontStyle f = function ("italic");
FontStyle f = function ("itAlic");
should return the same.
source
share