Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

string-join

string-join

The string-join function in XQuery is used to concatenate a sequence of strings into a single string, with a specified separator between each. This function is particularly useful for combining strings into a formatted output.

Syntax

fn:string-join(arg1, arg2)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg1
Required
A sequence of strings to be joined. Each item in the sequence is joined together in the order they appear. If the sequence is empty, the function returns an empty string.
arg2
Required
The string to insert between adjacent items in the sequence. This separator is appended between each pair of strings in the sequence.

Return Value

  • Returns a string created by concatenating the members of the
    $arg1
    sequence using
    $arg2
    as a separator.
  • If the value of
    $arg2
    is the zero-length string, the members of
    $arg1
    are concatenated without a separator.
  • If the sequence is empty, it returns an empty string.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:string-join( ('a', 'b', 'c'), '')
abc
fn:string-join( ('a', 'b', 'c'), '/*')
a/*b/*c
fn:string-join( ('a', '', 'c'), '/*')
a/*/*c
fn:string-join( 'a', '/*')
a
fn:string-join((), '/*')
zero-length string
fn:string-join(("Line1", "Line2", "Line3"), "\n")
"Line1 Line2 Line3"

0 COMMENTS

We’d like to hear from you!