string y = string.Join(", ", x);
declare
Last : Cursor := X.Last;
Y : Unbounded_String;
begin
for C in X.Iterate loop
Y := Y & Element (C) & (if C = Last then "" else ", ");
end loop;
end;
#define DELIM ", "
#define L 64
char y[L] = {'\0'};
for (int i = 0; i < N; ++i)
{
if (i && x[i][0])
strcat(y, DELIM);
strcat(y, x[i]);
}
(clojure.string/join "," '("abc" "def" "ghi") )
y = x | views::join_with(',') | to<std::string>();
std::vector<std::string> x;
std::string y;
const char* const delim = ", ";
switch (x.size())
{
case 0: y = ""; break;
case 1: y = x[0]; break;
default:
std::ostringstream os;
std::copy(x.begin(), x.end() - 1,
std::ostream_iterator<std::string>(os, delim));
os << *x.rbegin();
y = os.str();
}
write (unit=y,fmt='(*(A,:,", "))') x
y := strings.Join(x, ", ")
{-# LANGUAGE OverloadedStrings #-}
y :: T.Text
y = T.intercalate ", " x
String y = "";
for(int index = 0; index < x.size(); index++) {
if(index != 0) {
y += ", ";
}
y += x.get(index);
}
String y = String.join(", ", x);
val y = listOf(x).joinToString(", ")
(setf y (format nil "~{~a~^,~}" x))
(defvar y (format nil "~{~A~^, ~}" x))
(setf y (reduce (lambda (a b)
(concatenate 'string a ", " b))
x))
y = table.concat(x, ", ")
NSString y=[x componentsJoinedByString:@", "];
var
_x: Array of string;
_y: String;
i: Integer;
begin
_y := ''; //initialize result to an empy string
// assume _x is initialized to contain some values
for i := Low(_x) to High(_x) do
begin
_y := _y + _x[i];
if i < High(_x) then _y := _y + ';';
end;
end;
y = ', '.join(map(str, x))
(define y
(foldr (lambda (a b)
(if (string=? b "")
a
(string-append a ", " b)))
""
x))
y := x joinSeparatedBy: ', '.
', ' join: #('abc' 'def' 'ghi')
Dim x = {"a", "b", "c", "d"}.ToList
Dim y = String.Join(",", x)