[Vala] string manipulation question



Is there a better way to do this?

   string    htmlCardItemSeparated (string itemName,
ArrayList<string> itemList, string separator = ", ")
    {    if    (itemList.size < 1)    return    "";

        string    itms    =   @"<tr><td>$itemName</td><td>$(itemList[0])";
        for    (int i = 1;    i < itemList.size;    i++)
            itms    =    itms    +    @"$separator$(itemList[i])";
        itms    =    itms    +    "</td></tr>\n";
        return    itms;
    }




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]