Case Insensitive Keywords


You need to find a method to allow keywords of mixed case. For example, you require the log keyword to be all lowercase when the user could use Title Case or be all uppercase.

file attachments


wheeley wrote Jan 11, 2010 at 1:33 AM

I think I have a fix for this. Please changes in zip file. I believe I have all the encoding todo's fixed also.

wheeley wrote Jan 12, 2010 at 11:00 PM

Thanks for applying some of it. But you still have issues with other keywords. I work with many developers on a project and even though we are forcing our developers to use consistent header comments, the keywords sometimes get adding incorrectly my new people. So sometimes it is $Revision$, other times it's $revision$ and yet other times its $REVISION$. I was trying to create a generic method of finding all the keywords possibilities at once. I see why it is slow. So another method you could try is create a second buffer in lowercase that you use to scan with and then alter both buffers at once and only write out the original. As to your question "Also I have not fully understood what you have done with replacing _CR/_LF... what was the intention behind this?", I was trying to use the correct encoding to test with. But you can't compare a byte to a byte array. And since "\n" & "\r" always convert to a single byte array I was just accessing the array directly to accomplish encoding specific testing.