Changes from Stevo Crvenkovski. See ChangeLog Mar 23 22:14:21

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2302 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1997-05-03 18:05:21 +00:00
parent d0edc9a79c
commit e22ff194a4
5 changed files with 875 additions and 330 deletions

View file

@ -172,6 +172,7 @@ TcpPort.m \
TextCStream.m \
Time.m \
UdpPort.m \
Unicode.m \
behavior.m \
lex.pl.m \
lex.sf.m \
@ -295,6 +296,7 @@ include/TcpPort.h \
include/TextCStream.h \
include/Time.h \
include/UdpPort.h \
include/Unicode.h \
include/ValueHolding.h \
include/behavior.h \
include/fake-main.h \
@ -378,6 +380,8 @@ NSGCString.m \
NSGData.m \
NSGDictionary.m \
NSGSet.m \
NSGSequence.m \
NSGString.m \
NSHashTable.m \
NSHost.m \
NSInvocation.m \
@ -455,6 +459,8 @@ include/NSGCString.h \
include/NSGData.h \
include/NSGDictionary.h \
include/NSGSet.h \
include/NSGSequence.h \
include/NSGString.h \
include/NSHashTable.h \
include/NSHost.h \
include/NSInvocation.h \

View file

@ -31,6 +31,9 @@
#include <gnustep/base/behavior.h>
/* memcpy(), strlen(), strcmp() are gcc builtin's */
#include <gnustep/base//Unicode.h>
@implementation NSGCString
/* This is the designated initializer for this class. */
@ -111,13 +114,19 @@
return _count;
}
- (unsigned int) length
{
return _count;
}
- (unichar) characterAtIndex: (unsigned int)index
{
/* xxx This should raise an NSException. */
CHECK_INDEX_RANGE_ERROR(index, _count);
return (unichar) _contents_chars[index];
return chartouni(_contents_chars[index]);
}
- (NSString*) substringFromRange: (NSRange)aRange
{
if (aRange.location > _count)
@ -128,6 +137,7 @@
length: aRange.length];
}
// FOR IndexedCollection SUPPORT;
- objectAtIndex: (unsigned)index
@ -136,6 +146,16 @@
return [NSNumber numberWithChar: _contents_chars[index]];
}
- (int) _baseLength
{
return _count;
}
- (id) initWithString: (NSString*)string
{
return [self initWithCString:[string cStringNoCopy]];
}
@end

File diff suppressed because it is too large Load diff