File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
doc/reference/reference_lua Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ Below is a list of all additional ``string`` functions.
238
238
239
239
.. _string-split :
240
240
241
- .. function :: split(input-string [, split-string])
241
+ .. function :: split(input-string [, split-string, max ])
242
242
243
243
Split ``input-string `` into one or more output strings
244
244
in a table. The places to split are the places where
@@ -247,6 +247,7 @@ Below is a list of all additional ``string`` functions.
247
247
:param input-string: (string) the string to split
248
248
:param split-string: (string) the string to find within ``input-string ``.
249
249
Default = space.
250
+ :param max - maximum number of delimiters to process counting from the beginning of the input string. Result will contain max + 1 parts maximum.
250
251
251
252
:Return: table of strings that were split from ``input-string ``
252
253
:Rtype: table
@@ -258,10 +259,11 @@ Below is a list of all additional ``string`` functions.
258
259
tarantool> string = require('string')
259
260
---
260
261
...
261
- tarantool> string.split("A*BXX C ", "XX" )
262
+ tarantool> string.split("one:two:three: four ", ":", 2 )
262
263
---
263
- - - A*B
264
- - ' C'
264
+ - - one
265
+ - two
266
+ - 'three: four'
265
267
...
266
268
267
269
.. _string-strip :
You can’t perform that action at this time.
0 commit comments