concat
public text v1 · immutablestock concat(str[], len, ...)
{
len--;
new num = numargs();
new strindex = 0;
new arg = 2;
new argindex;
new argval;
while (arg < num)
{
argindex = 0;
do
{
argval = getarg(arg, argindex);
if (argval == 0) break;
str[strindex] = argval;
strindex++;
if (strindex == len) goto concatend;
argindex++;
}
while (argindex != 0); // Impossible (ignores a warning)
arg++;
}
concatend: // Stupid single level breaks!
str[strindex] = 0; // Null terminate
}