1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN">
6 <style type=
"text/css">
9 font-family: verdana
, sans-serif
;
29 text-decoration:underline
;
34 text-decoration: none
;
47 border-bottom-width:1px;
48 border-bottom-style:dotted
;
64 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
67 <big><tt>Global.String.join
(str1,
str2,
glue)
</tt></big><br>
73 append one string onto another and add some
"glue"
74 if none of the strings is empty or null.
<br><br>
77 <li><b>Parameter
</b> <code>String
</code>:
<br/>
78 the first string
<li><b>Parameter
</b> <code>String
</code>:
<br/>
79 the string to be appended onto the first one
<li><b>Parameter
</b> <code>String
</code>:
<br/>
80 the
"glue" to be inserted between both strings
81 <li><b>Returns
</b><br>
82 String the resulting string
93 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
95 <td>Sourcecode in /root/helma-
1.6.1/modules/core/String.js:
96 <pre><font color=
"#aaaaaa">663:
</font> String.join = function(str1, str2, glue) {
97 <font color=
"#aaaaaa">664:
</font> if (glue == null)
98 <font color=
"#aaaaaa">665:
</font> glue = String.NULL;
99 <font color=
"#aaaaaa">666:
</font> if (str1
&& str2)
100 <font color=
"#aaaaaa">667:
</font> return str1 + glue + str2;
101 <font color=
"#aaaaaa">668:
</font> else if (str2)
102 <font color=
"#aaaaaa">669:
</font> return str2;
103 <font color=
"#aaaaaa">670:
</font> return str1;
104 <font color=
"#aaaaaa">671:
</font> }