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 program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFString.h"
21
22OF_ASSUME_NONNULL_BEGIN
23
36- (void)setCharacter: (OFUnichar)character atIndex: (size_t)index;
37
43- (void)appendString: (OFString *)string;
44
51- (void)appendCharacters: (const OFUnichar *)characters length: (size_t)length;
52
60- (void)appendUTF8String: (const char *)UTF8String;
61
71- (void)appendUTF8String: (const char *)UTF8String
72 length: (size_t)UTF8StringLength;
73
82- (void)appendCString: (const char *)cString
83 encoding: (OFStringEncoding)encoding;
84
95- (void)appendCString: (const char *)cString
96 encoding: (OFStringEncoding)encoding
97 length: (size_t)cStringLength;
98
111- (void)appendFormat: (OFConstantString *)format, ...;
112
124- (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments;
125
129- (void)uppercase;
130
134- (void)lowercase;
135
143- (void)capitalize;
144
151- (void)insertString: (OFString *)string atIndex: (size_t)index;
152
158- (void)deleteCharactersInRange: (OFRange)range;
159
166- (void)replaceCharactersInRange: (OFRange)range
167 withString: (OFString *)replacement;
168
175- (void)replaceOccurrencesOfString: (OFString *)string
176 withString: (OFString *)replacement;
177
188- (void)replaceOccurrencesOfString: (OFString *)string
189 withString: (OFString *)replacement
190 options: (int)options
191 range: (OFRange)range;
192
197
202
207
211- (void)makeImmutable;
212@end
213
214OF_ASSUME_NONNULL_END
OFStringEncoding
The encoding of a string.
Definition OFString.h:65
A class for storing constant strings using the @"" literal.
Definition OFConstantString.h:42
A class for storing and modifying strings.
Definition OFMutableString.h:30
void makeImmutable()
Converts the mutable string to an immutable string.
Definition OFMutableString.m:537
void uppercase()
Converts the string to uppercase.
Definition OFMutableString.m:368
void deleteLeadingWhitespaces()
Deletes all whitespaces at the beginning of the string.
Definition OFMutableString.m:481
void lowercase()
Converts the string to lowercase.
Definition OFMutableString.m:376
void capitalize()
Capitalizes the string.
Definition OFMutableString.m:384
void deleteEnclosingWhitespaces()
Deletes all whitespaces at the beginning and the end of the string.
Definition OFMutableString.m:526
void deleteTrailingWhitespaces()
Deletes all whitespaces at the end of the string.
Definition OFMutableString.m:499
A class for handling strings.
Definition OFString.h:139
A range.
Definition OFObject.h:110