ObjFW  Diff

Differences From Artifact [eb7e2198d6]:

To Artifact [e5252f091b]:


1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */



#import "OFObject.h"

/**
 * A class for storing and modifying strings.
 */
@interface OFString: OFObject










>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import <stdarg.h>

#import "OFObject.h"

/**
 * A class for storing and modifying strings.
 */
@interface OFString: OFObject
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
 * Creates a new OFString from a C string.
 *
 * \param str A C string to initialize the OFString with
 * \return A new OFString
 */
+ newFromCString: (const char*)str;





















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





















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

/**
 * \return The length of the OFString







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
 * Creates a new OFString from a C string.
 *
 * \param str A C string to initialize the OFString with
 * \return A new OFString
 */
+ newFromCString: (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
 */
+ newFromFormatCString: (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
 */
+ newFromFormatCString: (const char*)fmt
	 withArguments: (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;

/**
 * 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, ...;

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

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

/**
 * \return The length of the OFString
94
95
96
97
98
99
100


















101
102
103
104
105
106
107
/**
 * Append a C string to the OFString.
 *
 * \param str A C string to append
 */
- appendCString: (const char*)str;



















/**
 * Reverse the OFString.
 */
- reverse;

/**
 * Upper the OFString.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/**
 * Append a C string to the OFString.
 *
 * \param str A C string to append
 */
- appendCString: (const char*)str;

/**
 * Append a formatted C string to the OFString.
 * See printf for the format syntax.
 *
 * \param fmt A format C string which generates the string to append
 */
- appendWithFormatCString: (const char*)fmt, ...;

/**
 * Append a formatted C string to the OFString.
 * See printf for the format syntax.
 *
 * \param fmt A format C string which generates the string to append
 * \param args The arguments used in the format string
 */
- appendWithFormatCString: (const char*)fmt
	     andArguments: (va_list)args;

/**
 * Reverse the OFString.
 */
- reverse;

/**
 * Upper the OFString.