I have strings, which I read from a document looking like the following:
IFCPERSONANDORGANIZATION
My goal is to create a new entity of a class that is called the same. Therefore I need this string to match the class name. However, the class name (which I cannot change) looks like the following:
IfcPersonAndOrganization
Is there any way I can change that input string so it matches the class-name regarding upper and lower cases?
Unfortunately .ToTitle does not work for my purpose as there are no spaces in my input string. I do have, however, a text file that contains all the class names possible (~800). So I could probably write a method, that checks the text file for the matching name and changes my input string accordingly. I am afraid that this will take pretty long and would be very inefficient though. EDIT: The text file contains one class name per line.
Anyone has an idea that might be more elegant and faster?