{ "ns" : "http://zorba.io/modules/string", "description" : "
This module provides string related functions.
\nMostly, the functions in this module provide primitives\n to work with streamable strings. For example, it allows to\n check whether a given string is streamable or seekable.
\n", "sees" : [ ], "authors" : [ "\n This function behaves like\n fn:analyze-string
\n but returns a JSON array rather than an XML element.\n", "summary" : "
Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "$input
were a zero-length string.match
or non-match
. For non-match
, the value is a string that is the part of $input
that did not match; for match
, the value is either a string that is the part of $input
that matched (when $pattern
contains no capturing groups) or an array containing values for both capturing groups and other matches. Capturing group matches are themselves arrays where the first element is the group number (1-based) and subsequent elements are either a string that is the part of $input
that matched or sub-arrays for nested capturing groups." }, "errors" : [ ] }, { "arity" : 3, "name" : "analyze-string", "qname" : "string:analyze-string", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as array() external", "description" : " Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.\n
\n This function behaves like\n fn:analyze-string
\n but returns a JSON array rather than an XML element.\n", "summary" : "
Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "$input
were a zero-length string.fn:matches
function.match
or non-match
. For non-match
, the value is a string that is the part of $input
that did not match; for match
, the value is either a string that is the part of $input
that matched (when $pattern
contains no capturing groups) or an array containing values for both capturing groups and other matches. Capturing group matches are themselves arrays where the first element is the group number (1-based) and subsequent elements are either a string that is the part of $input
that matched or sub-arrays for nested capturing groups." }, "errors" : [ ] }, { "arity" : 1, "name" : "is-seekable", "qname" : "string:is-seekable", "signature" : "($s as string) as boolean external", "description" : "
This function checks whether a given string item is a\n seekable stream string.
\nFor example, a seekable streamable string is returned by the\n file module.
\n", "summary" : "This function checks whether a given string item is a\n seekable stream string.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurence" : null, "description" : "This function checks whether a given string item is implemented by a\n streamable string.
\nA streamable string is produced by some functions of a module.\n It's an optimized implementation of an string to handle arbitrary\n sized data. The drawback is that its value can only be consumed once.\n That is, only one function can access the value of a streamable string\n item.
\n", "summary" : "This function checks whether a given string item is implemented by a\n streamable string.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurence" : null, "description" : "This function materializes a streamable string.
\nThe drawback of a streamable (non-seekable) string is that\n its value can only be consumed once. That is, only one function\n can access the value of astreamable string item.
\nIn order to remedy this situation, this function can be used to\n convert a streamable string into its non-streamable counterpart. As a\n result, the string returned by this function has the same value as its\n input but is materialized and, hence, can be consumed multiple times.
\n", "summary" : "This function materializes a streamable string.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurence" : null, "description" : "Returns a sequence of strings constructed by splitting the input wherever\n the given separator is found.
\nThe function is different from tokenize. It doesn't allow\n the separator to be a regular expression. This restriction allows for more\n performant implementation. Specifically, the function processes\n streamable strings as input in a streamable way which is particularly useful\n to tokenize huge strings.
\n", "summary" : "Returns a sequence of strings constructed by splitting the input wherever\n the given separator is found.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurence" : null, "description" : "