1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-28 00:40:07 +08:00
SpaceVim/lua/spacevim/api/vim/regex.lua
2022-07-10 20:51:19 +08:00

24 lines
663 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--=============================================================================
-- 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