while (iter != end_iter && *iter != '/') { ++iter; } if (iter == end_iter) {
if (! FindCharInReadable('/', iter, end_iter))
ParseNormalMIMETypesEntry(const nsAString& aEntry,                          nsAString::const_iterator& aMajorTypeStart,                          nsAString::const_iterator& aMajorTypeEnd,                          nsAString::const_iterator& aMinorTypeStart,                          nsAString::const_iterator& aMinorTypeEnd,                          nsAString& aExtensions,                          nsAString::const_iterator& aDescriptionStart,                          nsAString::const_iterator& aDescriptionEnd) {  NS_ASSERTION(!aEntry.IsEmpty(), "Empty Normal MIME types entry being parsed.");  nsAString::const_iterator start_iter, end_iter, iter;    aEntry.BeginReading(start_iter);  aEntry.EndReading(end_iter);  // no description  aDescriptionStart = start_iter;  aDescriptionEnd = start_iter;  // skip leading whitespace  while (start_iter != end_iter && nsCRT::IsAsciiSpace(*start_iter)) {    ++start_iter;  }  if (start_iter == end_iter) {    return NS_ERROR_FAILURE;  }  // skip trailing whitespace  do {    --end_iter;  } while (end_iter != start_iter && nsCRT::IsAsciiSpace(*end_iter));             ++end_iter; // point to first whitespace char (or to end of string)  iter = start_iter;  // get the major type  while (iter != end_iter && *iter != '/') {    ++iter;  }  if (iter == end_iter) {    return NS_ERROR_FAILURE;  }  aMajorTypeStart = start_iter;  aMajorTypeEnd = iter;    // get the minor type  if (++iter == end_iter) {    return NS_ERROR_FAILURE;  }  start_iter = iter;  while (iter != end_iter && !nsCRT::IsAsciiSpace(*iter)) {     ++iter;  }  aMinorTypeStart = start_iter;  aMinorTypeEnd = iter;  // get the extensions  aExtensions.Truncate();  while (iter != end_iter) {    while (iter != end_iter && nsCRT::IsAsciiSpace(*iter)) {      ++iter;    }    start_iter = iter;    while (iter != end_iter && !nsCRT::IsAsciiSpace(*iter)) {      ++iter;    }    aExtensions.Append(Substring(start_iter, iter));    if (iter != end_iter) { // not the last extension      aExtensions.Append(NS_LITERAL_STRING(","));    }  }  return NS_OK;}