diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-01-13 09:34:41 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-01-13 09:34:41 -0800 |
commit | 5c0323bdbd83b16af8042491e8e38ca10bbf0bd0 (patch) | |
tree | 69248053673f932cc40e94cb650f53c2dc216ae3 /search.lua | |
parent | 70334e9dac43e2927495818d31e8ef2d5ad17384 (diff) | |
parent | d8ec2597110ac95fcb61c5a46af95bf094c95268 (diff) | |
download | view.love-5c0323bdbd83b16af8042491e8e38ca10bbf0bd0.tar.gz |
Merge text.love
Diffstat (limited to 'search.lua')
-rw-r--r-- | search.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/search.lua b/search.lua index 37306f8..f7d4732 100644 --- a/search.lua +++ b/search.lua @@ -116,6 +116,8 @@ function find(s, pat, i, plain) return s:find(pat, i, plain) end +-- TODO: avoid the expensive reverse() operations +-- Particularly if we only care about literal matches, we don't need all of string.find function rfind(s, pat, i, plain) if s == nil then return end local rs = s:reverse() |