diff options
author | Gregory Anders <greg@gpanders.com> | 2021-09-25 20:08:36 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2021-09-25 20:11:32 -0600 |
commit | 84f66909e4008a57da947f1640bfc24da5e41a72 (patch) | |
tree | 4f61309a1c3a9f901c39899397555c6a30eb34ed /runtime/doc | |
parent | 5fa26e2c2fcc208ca31187de4338d5b6f746f2e1 (diff) | |
download | rneovim-84f66909e4008a57da947f1640bfc24da5e41a72.tar.gz rneovim-84f66909e4008a57da947f1640bfc24da5e41a72.tar.bz2 rneovim-84f66909e4008a57da947f1640bfc24da5e41a72.zip |
refactor: use kwargs parameter in vim.split
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lua.txt | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 208a94e377..4ceb123ffc 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1373,23 +1373,25 @@ pesc({s}) *vim.pesc()* See also: ~ https://github.com/rxi/lume -split({s}, {sep}, {plain}, {trimempty}) *vim.split()* +split({s}, {sep}, {kwargs}) *vim.split()* Splits a string at each instance of a separator. Examples: > - split(":aa::b:", ":") --> {'','aa','','b',''} - split("axaby", "ab?") --> {'','x','y'} - split("x*yz*o", "*", true) --> {'x','yz','o'} - split("|x|y|z|", "|", true, true) --> {'x', 'y', 'z'} + + split(":aa::b:", ":") --> {'','aa','','b',''} + split("axaby", "ab?") --> {'','x','y'} + split("x*yz*o", "*", {plain=true}) --> {'x','yz','o'} + split("|x|y|z|", "|", {trimempty=true}) --> {'x', 'y', 'z'} < Parameters: ~ - {s} String to split - {sep} Separator string or pattern - {plain} If `true` use `sep` literally (passed to - String.find) - {trimempty} If `true` remove empty items from the front - and back of the list + {s} String to split + {sep} Separator string or pattern + {kwargs} Keyword arguments: + • plain: (boolean) If `true` use `sep` literally + (passed to string.find) + • trimempty: (boolean) If `true` remove empty + items from the front and back of the list Return: ~ List-like table of the split components. |