ObjFW
Loading...
Searching...
No Matches
OFMutableString.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This file is part of ObjFW. It may be distributed under the terms of the
7 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8 * the packaging of this file.
9 *
10 * Alternatively, it may be distributed under the terms of the GNU General
11 * Public License, either version 2 or 3, which can be found in the file
12 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13 * file.
14 */
15
16#import "OFString.h"
17
18OF_ASSUME_NONNULL_BEGIN
19
32- (void)setCharacter: (OFUnichar)character atIndex: (size_t)index;
33
39- (void)appendString: (OFString *)string;
40
47- (void)appendCharacters: (const OFUnichar *)characters length: (size_t)length;
48
56- (void)appendUTF8String: (const char *)UTF8String;
57
67- (void)appendUTF8String: (const char *)UTF8String
68 length: (size_t)UTF8StringLength;
69
78- (void)appendCString: (const char *)cString
79 encoding: (OFStringEncoding)encoding;
80
91- (void)appendCString: (const char *)cString
92 encoding: (OFStringEncoding)encoding
93 length: (size_t)cStringLength;
94
107- (void)appendFormat: (OFConstantString *)format, ...;
108
120- (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments;
121
125- (void)uppercase;
126
130- (void)lowercase;
131
139- (void)capitalize;
140
147- (void)insertString: (OFString *)string atIndex: (size_t)index;
148
154- (void)deleteCharactersInRange: (OFRange)range;
155
162- (void)replaceCharactersInRange: (OFRange)range
163 withString: (OFString *)replacement;
164
171- (void)replaceOccurrencesOfString: (OFString *)string
172 withString: (OFString *)replacement;
173
184- (void)replaceOccurrencesOfString: (OFString *)string
185 withString: (OFString *)replacement
186 options: (int)options
187 range: (OFRange)range;
188
193
198
203
207- (void)makeImmutable;
208@end
209
210OF_ASSUME_NONNULL_END
OFStringEncoding
The encoding of a string.
Definition OFString.h:61
A class for storing constant strings using the @"" literal.
Definition OFConstantString.h:38
A class for storing and modifying strings.
Definition OFMutableString.h:26
void makeImmutable()
Converts the mutable string to an immutable string.
Definition OFMutableString.m:533
void uppercase()
Converts the string to uppercase.
Definition OFMutableString.m:364
void deleteLeadingWhitespaces()
Deletes all whitespaces at the beginning of the string.
Definition OFMutableString.m:477
void lowercase()
Converts the string to lowercase.
Definition OFMutableString.m:372
void capitalize()
Capitalizes the string.
Definition OFMutableString.m:380
void deleteEnclosingWhitespaces()
Deletes all whitespaces at the beginning and the end of the string.
Definition OFMutableString.m:522
void deleteTrailingWhitespaces()
Deletes all whitespaces at the end of the string.
Definition OFMutableString.m:495
A class for handling strings.
Definition OFString.h:135
A range.
Definition OFObject.h:106