Revision: 29367
          http://sourceforge.net/p/bibdesk/svn/29367
Author:   hofman
Date:     2025-07-25 16:13:41 +0000 (Fri, 25 Jul 2025)
Log Message:
-----------
use method to replace characters in range

Modified Paths:
--------------
    trunk/bibdesk/BibDocument_UI.m

Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m      2025-07-25 15:41:40 UTC (rev 29366)
+++ trunk/bibdesk/BibDocument_UI.m      2025-07-25 16:13:41 UTC (rev 29367)
@@ -1480,11 +1480,8 @@
                     // value may be nil, so check before calling rangeOfString:
                     if ([value length] >= [oldKey length]) {
                         NSRange range = [value rangeOfWord:oldKey 
nonWordCharacters:invalidSet options:NSCaseInsensitiveSearch];
-                        if (range.location != NSNotFound) {
-                            NSMutableString *tmpString = [value mutableCopy];
-                            [tmpString replaceCharactersInRange:range 
withString:key];
-                            [aPub setField:field toValue:tmpString];
-                        }
+                        if (range.location != NSNotFound)
+                            [aPub setField:field toValue:[value 
stringByReplacingCharactersInRange:range withString:key]];
                     }
                 }
             }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to