1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-29 10:50:06 +08:00
SpaceVim/lua/spacevim/api/vim/regex.lua

24 lines
663 B
Lua
Raw Normal View History

2022-07-10 20:51:19 +08:00
--=============================================================================
-- regex.lua --- use vim regex in lua
-- Copyright (c) 2016-2019 Wang Shidong & Contributors
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
-- in viml you can use =~/=~#/=~
local M = {}
M.__cmp = require('spacevim.api').import('vim.compatible')
function M.equal(a, b, ...)
local argv = {...}
local ignore = argv[1] or false
if M.__cmp.fn.matchstr(a, b) == '' then return false else return true end
end
return M