pike.git / lib / modules / String.pmod

version» Context lines:

pike.git/lib/modules/String.pmod:1:   #define BEGIN 32      constant count=__builtin.string_count;      /*    * Implode an array of strings to an english 'list'    * ie. ({"foo","bar","gazonk"}) beomces "foo, bar and gazonk"    */ - string implode_nicely(string *foo, string|void and) + string implode_nicely(array(string|int|float) foo, string|void and)   {    if(!and) and="and"; -  +  foo=(array(string))foo;    switch(sizeof(foo))    {    case 0: return "";    case 1: return foo[0];    default: return foo[0..sizeof(foo)-2]*", "+" "+and+" "+foo[-1];    }   }      string capitalize(string s)   {