PRInt32 offset = index ? temp.FindChar( ',', 0, index ) : 0; if ( offset != -1 ) {  PRInt32 end = temp.FindChar( ',', offset+1 ); if ( end == -1 ) {  end = temp.Length();
PRInt32 offset = -1;  while( index-- ) {  offset = advanceToEndOfQuotedArg( p, offset, argLen );  offset = temp.FindChar( ',', offset ); if ( offset == kNotFound ) {  return result;
nsCString nsNativeAppSupportWin::ParseDDEArg( HSZ args, int index ) {    nsCString result;    DWORD argLen = DdeQueryString( mInstance, args, NULL, NULL, CP_WINANSI );    if ( argLen ) {        nsCString temp;        // Ensure result's buffer is sufficiently big.        temp.SetLength( argLen + 1 );        // Now get the string contents.        DdeQueryString( mInstance, args, (char*)temp.get(), temp.Length(), CP_WINANSI );        // Parse out the given arg.  We assume there's no commas within quoted strings        // (which may not be accurate, but makes life so much easier).        const char *p = temp.get();        // Skip index commas.        PRInt32 offset = index ? temp.FindChar( ',', 0, index ) : 0;        if ( offset != -1 ) {            // Desired argument starts there and ends at next comma.            PRInt32 end = temp.FindChar( ',', offset+1 );            if ( end == -1 ) {                // Rest of string.                end = temp.Length();            }            // Extract result.            result.Assign( temp.get() + offset, end - offset );        }    }    return result;}