[NO ISSUE] Update split() document with a new example
In the split() function document, added an example with two consecutive
`sep`s in the input `string` to clarify this edge case.
Change-Id: I9d944ac560957581523de52c0533f91225c059e6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7205
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
Tested-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
Integration-Tests: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md b/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md
index 528ff5d..8a98690 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md
@@ -505,6 +505,7 @@
* `string` : a `string` to be split.
* Return Value:
* an array of substrings by splitting the input `string` by `sep`,
+ * in case of two consecutive `sep`s in the `string`, the result of splitting the two consecutive `sep`s will be the empty string `""`,
* `missing` if the argument is a `missing` value,
* `null` if the argument is a `null` value,
* any other non-string input value will cause a type error.
@@ -519,6 +520,16 @@
[ "test", "driven", "development" ]
+ * Example with two consecutive `sep`s in the `string`:
+
+ split("123//456", "/");
+
+
+ * The expected result is:
+
+ [ "123", "", "456" ]
+
+
### starts_with ###
* Syntax: