[Vala] string manipulation question
- From: Charles Hixson <charleshixsn earthlink net>
- To: vala-list gnome org
- Subject: [Vala] string manipulation question
- Date: Sat, 01 May 2010 14:15:13 -0700
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]