2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __NGExtensions_NGCString_H__
24 #define __NGExtensions_NGCString_H__
26 #import <Foundation/NSObject.h>
30 @interface NGCString : NSObject < NSCopying, NSMutableCopying, NSCoding >
36 + (id)stringWithCString:(const char *)_value length:(unsigned)_len;
37 + (id)stringWithCString:(const char *)_value;
38 - (id)initWithCString:(const char *)_value length:(unsigned)_len;
39 - (id)initWithCString:(const char *)_value;
43 - (unsigned int)length;
44 - (unichar)characterAtIndex:(unsigned int)_idx;
48 - (BOOL)isEqual:(id)_object;
49 - (BOOL)isEqualToCString:(NGCString *)_cstr;
50 - (BOOL)isEqualToString:(NSString *)_str;
55 - (id)copyWithZone:(NSZone *)_zone;
56 - (id)mutableCopyWithZone:(NSZone *)_zone;
60 - (void)encodeWithCoder:(NSCoder *)_coder;
61 - (id)initWithCoder:(NSCoder *)_decoder;
65 - (const char *)cString;
66 - (unsigned int)cStringLength;
67 - (void)getCString:(char *)_buffer;
68 - (void)getCString:(char *)_buffer maxLength:(unsigned int)_maxLength;
69 - (char)charAtIndex:(unsigned int)_idx;
71 // getting numeric values
73 - (double)doubleValue;
76 - (NSString *)stringValue;
80 - (NSString *)description;
84 @interface NGMutableCString : NGCString
86 unsigned int capacity;
91 - (void)appendString:(id)_str; // either NSString or NGCString
92 - (void)appendCString:(const char *)_cstr;
93 - (void)appendCString:(const char *)_cstr length:(unsigned)_len;
97 - (void)removeAllContents;
101 #endif /* __NGExtensions_NGCString_H__ */