mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 04:30:04 +08:00
11 lines
390 B
Plaintext
11 lines
390 B
Plaintext
Execute ( SpaceVim lua api: data#string ):
|
|
if !has('nvim-0.5.0')
|
|
finish
|
|
endif
|
|
let cmp = SpaceVim#api#import('vim#compatible')
|
|
Log 'test trim()'
|
|
lua sp_str = require('spacevim.api').import('data.string')
|
|
AssertEqual cmp.luaeval("sp_str.trim(' s b ')"), 's b'
|
|
AssertEqual cmp.luaeval("sp_str.strAllIndex('hello spacevim hello', 'hello', 0)"), [[0, 5], [15, 20]]
|
|
|