- 186 名前:デフォルトの名無しさん mailto:sage [2008/11/04(火) 20:08:38 ]
- std::string::size_type pos2 = str.find(',', pos) + 1;
if (str.substr(pos, pos2 - pos - 1) != "00:00:00") { pos = pos2; for (int i = 0; i < 3; i++) { if((pos = str.find(',', pos)) == std::string::npos) goto next; pos++; } pos2 = str.find(',', pos); if (pos2 == std::string::npos) pos2 = pos; else pos2++; Memo1->Lines->Add(str.substr(pos2, 4).c_str()); } next:; } } 要するにTStrings::operator[] の機能を自前で書けばすっきりするはずです。
|

|