rttrorg / rttr

C++ Reflection Library
https://www.rttr.org
MIT License
3.17k stars 439 forks source link

Make rttr::enumeration::name_to_value case insensitive #287

Open jcxz opened 4 years ago

jcxz commented 4 years ago

Hi,

would it be possible to add case insensitive string comparison to rttr::enumeration::name_to_value ? I imagine it could be an additional optional parameter of the method (something like variant name_to_value(string_view name, bool case_insensitive = false) const;) I am using RTTR to load input from user (in parsing enums passed to my progam on command line) and it would be nice to provide users of my program with the freedom to specify input in any case they want.