ObjFW  Diff

Differences From Artifact [8140132478]:

To Artifact [ea45f8fc70]:


10
11
12
13
14
15
16



17
18
19
20
21
22






23




24




25






26







27






28






29
30
 */

#import <wchar.h>
#import <stddef.h>

#import "OFString.h"




@interface OFWideCString: OFString
{
	wchar_t	*string;
	size_t  length;
}







- initAsWideCString: (wchar_t*)str;




- (wchar_t*)wcString;




- (size_t)length;






- (OFString*)clone;







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






- append: (OFString*)str;






- appendWideCString: (const wchar_t*)str;
@end







>
>
>






>
>
>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>


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
72
 */

#import <wchar.h>
#import <stddef.h>

#import "OFString.h"

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

/**
 * Initializes an already allocated OFWideCString.
 * 
 * \param str A wide C string to initialize the OFWideCString with.
 * \returns An initialized OFWideCString
 */
- initAsWideCString: (wchar_t*)str;

/**
 * \return The OFWideCString as a wide C string.
 */
- (wchar_t*)wcString;

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

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

/**
 * Compares the OFWideCString 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 wcscmp.
 */
- (int)compareTo: (OFString*)str;

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

/**
 * Append a wide C string to the OFWideCString.
 *
 * \param str A wide C string to append
 */
- appendWideCString: (const wchar_t*)str;
@end