gtk_text_iter_forward_search() comparison




I have been working on a little search experimentation. Gave writing a case in-sensitive gtk_text_iter_forward_search() a try. The code is shorter than what is in gtktextiter.c and it works a little faster. If a word is searched that isn't very frequent the time is about the same. If you just look for single chars or words that are frequent it looks to be quicker. Not sure if this a suitable method though. I know little of the textbuffer internals. UTF-8 gives me some trouble also.

There is a test progam at

https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/Csamples/search_textbuffer2.c

that does a side by side comparison of the two search methods. If there is an inherent problem with the test forward search please say so. If not, maybe it can be used. I would be glad to work on it a little more if corrections need to be made.

Thanks,
Eric


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]