ObjFW  Diff

Differences From Artifact [24a3ce2979]:

To Artifact [3f383f6fa1]:


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
73
74
75
76
77

78
79
80
81
82
83
84
85
86
87
88


89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

104
105
106
107
108

109
110
111
112
113
114
115
116
117
118
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

73
74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112

113
114
115

116
117
118
119
120
121
122







+
+
+
+
+




-
+

-
+






-
+

-
+







-
+

-
-
+
+














-
+








-
+









-
-
+
+














-
+




-
+


-







@interface OFString: OFObject
{
	char   *string;
	size_t length;
	BOOL   is_utf8;
}

/**
 * \return A new autoreleased OFString
 */
+ string;

/**
 * Creates a new OFString from a C string.
 *
 * \param str A C string to initialize the OFString with
 * \return A new OFString
 * \return A new autoreleased OFString
 */
+ newFromCString: (const char*)str;
+ stringWithCString: (const char*)str;

/**
 * Creates a new OFString from a format C string.
 * See printf for the format syntax.
 *
 * \param fmt A C string used as format to initialize the OFString
 * \return A new OFString
 * \return A new autoreleased OFString
 */
+ newFromFormatCString: (const char*)fmt, ...;
+ stringWithFormat: (const char*)fmt, ...;

/**
 * Creates a new OFString from a format C string.
 * See printf for the format syntax.
 *
 * \param fmt A C string used as format to initialize the OFString
 * \param args The arguments used in the format string
 * \return A new OFString
 * \return A new autoreleased OFString
 */
+ newFromFormatCString: (const char*)fmt
	 withArguments: (va_list)args;
+ stringWithFormat: (const char*)fmt
      andArguments: (va_list)args;

/**
 * Initializes an already allocated OFString.
 *
 * \return An initialized OFString
 */
- init;

/**
 * Initializes an already allocated OFString from a C string.
 *
 * \param str A C string to initialize the OFString with
 * \return An initialized OFString
 */
- initFromCString: (const char*)str;
- initWithCString: (const char*)str;

/**
 * Initializes an already allocated OFString from a format C string.
 * See printf for the format syntax.
 *
 * \param fmt A C string used as format to initialize the OFString
 * \return An initialized OFString
 */
- initFromFormatCString: (const char*)fmt, ...;
- initWithFormat: (const char*)fmt, ...;

/**
 * Initializes an already allocated OFString from a format C string.
 * See printf for the format syntax.
 *
 * \param fmt A C string used as format to initialize the OFString
 * \param args The arguments used in the format string
 * \return An initialized OFString
 */
- initFromFormatCString: (const char*)fmt
	  withArguments: (va_list)args;
- initWithFormat: (const char*)fmt
    andArguments: (va_list)args;

/**
 * \return The OFString as a wide C string
 */
- (const char*)cString;

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

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

/**
 * Frees the OFString and sets it to the specified OFString.
 * Sets the OFString to the specified OFString.
 *
 * \param str An OFString to set the OFString to.
 * \return The new OFString
 */
- setTo: (OFString*)str;

/**
 * Compares the OFString to another OFString.
 *
 * \param str An OFString to compare with