N
AME
implode_nicely
- make an english comma separated list
S
YNTAX
#include <string.h>
string implode_nicely(string *words, string|void separator)
D
ESCRIPTION
This function implodes a list of words to a readable string. If the separator is omitted, the default is 'and'.
E
XAMPLES
> implode_nicely(({"green"}));
Result: green
> implode_nicely(({"green","blue"}));
Result: green and blue
> implode_nicely(({"green","blue","white"}));
Result: green, blue and white
> implode_nicely(({"green","blue","white"}),"or");
Result: green, blue or white
K
EYWORDS
string
S
EE
A
LSO
`*