ObjFW  Diff

Differences From Artifact [ed35d22672]:

To Artifact [661330dd84]:


9
10
11
12
13
14
15



16
17
18
19
20
21






22




23




24






25







26






27






28
29
 * the packaging of this file.
 */

#import <stddef.h>

#import "OFString.h"




@interface OFCString: OFString
{
	char   *string;
	size_t length;
}







- initAsCString: (char*)str;




- (char*)cString;




- (size_t)length;






- (OFString*)clone;







- (int)compareTo: (OFString*)str;






- (OFString*)append: (OFString*)str;






- (OFString*)appendCString: (const char*)str;
@end







>
>
>






>
>
>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
|
>
>
>
>
>
>
|

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 * the packaging of this file.
 */

#import <stddef.h>

#import "OFString.h"

/**
 * An OFString using a C string as internal storage.
 */
@interface OFCString: OFString
{
	char   *string;
	size_t length;
}

/**
 * Initializes an already allocated OFCString.
 * 
 * \param str A C string to initialize the OFCString with.
 * \returns An initialized OFCString
 */
- initAsCString: (char*)str;

/**
 * \return The OFCString as a C string.
 */
- (char*)cString;

/**
 * \return The length of the OFCString.
 */
- (size_t)length;

/**
 * Clones the OFCString, creating a new one.
 * 
 * \return A copy of the OFCString
 */
- (OFString*)clone;

/**
 * Compares the OFCString to another OFString.
 *
 * \param str An OFString in a compatible type to compare with
 * \return An integer which is the result of the comparison, see strcmp.
 */
- (int)compareTo: (OFString*)str;

/**
 * Append another OFString to the OFCString.
 *
 * \param str An OFString in a compatible type to append
 */
- append: (OFString*)str;

/**
 * Append a C string to the OFCString.
 *
 * \param str A C string to append
 */
- appendCString: (const char*)str;
@end