aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 53d68fa5e6..208a94e377 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1373,20 +1373,23 @@ pesc({s}) *vim.pesc()*
See also: ~
https://github.com/rxi/lume
-split({s}, {sep}, {plain}) *vim.split()*
+split({s}, {sep}, {plain}, {trimempty}) *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*yz*o", "*", true) --> {'x','yz','o'}
+ split("|x|y|z|", "|", true, true) --> {'x', 'y', 'z'}
<
Parameters: ~
- {s} String to split
- {sep} Separator string or pattern
- {plain} If `true` use `sep` literally (passed to
- String.find)
+ {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
Return: ~
List-like table of the split components.