mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
[getCharacters:] and [getCharacters:range:] use higher level
methods for conversion. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7489 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
763dba098e
commit
f4bec54f7d
1 changed files with 2 additions and 9 deletions
|
@ -421,20 +421,13 @@ static IMP msInitImp; /* designated initialiser for mutable */
|
||||||
|
|
||||||
- (void) getCharacters: (unichar*)buffer
|
- (void) getCharacters: (unichar*)buffer
|
||||||
{
|
{
|
||||||
unsigned i;
|
strtoustr(buffer, _contents_chars, _count);
|
||||||
|
|
||||||
for (i = 0; i < _count; i++)
|
|
||||||
buffer[i] = chartouni(((unsigned char *)_contents_chars)[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) getCharacters: (unichar*)buffer range: (NSRange)aRange
|
- (void) getCharacters: (unichar*)buffer range: (NSRange)aRange
|
||||||
{
|
{
|
||||||
unsigned e, i;
|
|
||||||
|
|
||||||
GS_RANGE_CHECK(aRange, _count);
|
GS_RANGE_CHECK(aRange, _count);
|
||||||
e = aRange.location + aRange.length;
|
strtoustr(buffer, _contents_chars + aRange.location, aRange.length);
|
||||||
for (i = aRange.location; i < e; i++)
|
|
||||||
*buffer++ = chartouni(((unsigned char *)_contents_chars)[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) substringFromRange: (NSRange)aRange
|
- (NSString*) substringFromRange: (NSRange)aRange
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue