mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
tweak for more efficient string handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34084 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a220e9bdf0
commit
22289342b4
2 changed files with 4 additions and 7 deletions
|
@ -3,7 +3,8 @@
|
|||
* Source/NSString.m: Fix bug when widening mutable string in
|
||||
replaceOccurrencesOfString:...range:
|
||||
* Source/GSString.m: more efficient check to see if a literal string
|
||||
can be converted to ascii or latin1
|
||||
can be converted to ascii or latin1. Remove unnecessary constraint
|
||||
on when we need to widen strings.
|
||||
|
||||
2011-10-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
|
|
|
@ -2723,15 +2723,11 @@ transmute(GSStr self, NSString *aString)
|
|||
*/
|
||||
transmute = NO;
|
||||
}
|
||||
else if (internalEncoding == externalEncoding
|
||||
&& [aString canBeConvertedToEncoding: internalEncoding] == YES)
|
||||
else if ([aString canBeConvertedToEncoding: internalEncoding] == YES)
|
||||
{
|
||||
/*
|
||||
* The other string can be converted to the internal 8-bit encoding,
|
||||
* via the cString method, so we don't need to transmute, but we
|
||||
* can *not* use its GSStr.
|
||||
* NB. If 'internalEncoding != externalEncoding' the cString method
|
||||
* of the other string will not return data in the internal encoding.
|
||||
* so we don't need to transmute, but we can *not* use its GSStr.
|
||||
*/
|
||||
transmute = NO;
|
||||
other = 0;
|
||||
|
|
Loading…
Reference in a new issue