面倒だからBCB

AnsiString source_string = "ABC,1 2 3,山田 太郎";

TStringList* string_list = new TStringList; // == string_list.Create
char* work = source_string.c_str(); // == PCHAR(source_string)
AnsiString buffer;
bool quote = false;

while(true) {
 if (*work == ',' || *work == '\0')  {
  if (quote) {
   buffer = buffer + *work;
   work++;
   continue;
  }
  work++;
  string_list->Add(Buffer);
  if (*work == '\0') break;
  buffer = "";
  continue;
 } else if (*work == '\"') {
  quote = quote ? false : true;
 } else {
  buffer = buffer + *work;
  work++;
 }
}