Global.String.join (str1, str2, glue)
append one string onto another and add some "glue" if none of the strings is empty or null.

  • Parameter String:
    the first string
  • Parameter String:
    the string to be appended onto the first one
  • Parameter String:
    the "glue" to be inserted between both strings
  • Returns
    String the resulting string
Sourcecode in /home/hannes/helma/modules/core/String.js:
115:   String.join = function(str1, str2, glue) {
116:       if (glue == null)
117:           glue = String.NULL;
118:       if (str1 && str2)
119:           return str1 + glue + str2;
120:       else if (str2)
121:           return str2;
122:       return str1;
123:   }