Skip to content

Commit

Permalink
introducing function for joining strings and normalizing the output
Browse files Browse the repository at this point in the history
  • Loading branch information
riedde committed Sep 11, 2024
1 parent d3f4ce4 commit 5088dd5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions add/data/xqm/util.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,14 @@ declare function eutil:request-lang-preferred-iso639() as xs:string {
"en"

};

(:~
: Returns one joined and normalized string
:
: @param $string The string(s) to be processed
: @param $separator One ore more characters as separators for joining the string
: @return The string (joined and normalized space)
:)
declare function eutil:joindAndNormalize($strings as xs:string*, $separator as xs:string) as xs:string {
$strings => string-join($separator) => normalize-space()
};

0 comments on commit 5088dd5

Please sign in to comment.