Files
odfstudio/scripting/source
Neil Roberts e66d2aec00 tdf#171853 Use endsWith instead of checking lastIndexOf is at end
There seems to be an idiom used throughout the LibreOffice code where
lastIndexOf is called and then the returned index is checked to see if
it covers the entire end of the string. This should be equivalent to
just calling endsWith but it’s slightly less efficient because
lastIndexOf will pointlessly continue searching other places in the
string if the end doesn’t match.

Change-Id: I4c2c6dd750d41ffabf5d27011c22a4bbb5e32777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204300
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-26 09:32:38 +02:00
..
2025-03-10 14:18:35 +01:00