[JW Lua] Class Browser - search only at the beginning of a word

Artem Roschenko roschenkoartem at gmail.com
Fri Feb 4 16:17:12 CET 2022


It would be very convenient to implement a search also by matching any part
of the class name (method, etc.), and not just by the beginning.
And what's more, it can be case insensitive. At least that's how it was in
JW Browser and seems to be quite useful.
For myself, I made the following changes in the rgpluaclassbrowser.lua file:

Original line 160:
    > if include_all or k:find(search_text) == 1 then <
Search in any part of a word:
    > if include_all or k:find(search_text) then <
And a case-insensitive version:
   > if include_all or string.find(string.lower(k),
string.lower(search_text)) then <

Of course, string.lower(search_text) should be moved outside the block, but
these are details...

I am writing about this because it seems that it may be useful to someone
else. Thank you Robert!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20220204/ede40b4d/attachment.html>


More information about the JWLua mailing list