We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed1cf24 commit 071f715Copy full SHA for 071f715
1 file changed
src/DeclarativeCOS.Joiner.cls
@@ -0,0 +1,33 @@
1
+Class DeclarativeCOS.Joiner
2
+{
3
+
4
+ClassMethod join(collection As %Collection.AbstractList, separator As %String = "") As %String
5
6
+ if (collection = "") {
7
+ return ""
8
+ }
9
10
+ set string = ""
11
12
+ set index = ""
13
14
+ for {
15
+ set index = collection.Next(index)
16
17
+ quit:index=""
18
19
+ set item = collection.GetAt(index)
20
21
+ if (string = "") {
22
+ set string = "" _ item
23
24
+ else {
25
+ set string = string _ separator _ item
26
27
28
29
+ return string
30
+}
31
32
33
0 commit comments