ObjFW
OFMutableString.h
1 /*
2  * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
3  * Jonathan Schleifer <js@heap.zone>
4  *
5  * All rights reserved.
6  *
7  * This file is part of ObjFW. It may be distributed under the terms of the
8  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
9  * the packaging of this file.
10  *
11  * Alternatively, it may be distributed under the terms of the GNU General
12  * Public License, either version 2 or 3, which can be found in the file
13  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
14  * file.
15  */
16 
17 #import "OFString.h"
18 
19 OF_ASSUME_NONNULL_BEGIN
20 
33 - (void)setCharacter: (of_unichar_t)character
34  atIndex: (size_t)index;
35 
41 - (void)appendString: (OFString *)string;
42 
49 - (void)appendCharacters: (const of_unichar_t *)characters
50  length: (size_t)length;
51 
57 - (void)appendUTF8String: (const char *)UTF8String;
58 
66 - (void)appendUTF8String: (const char *)UTF8String
67  length: (size_t)UTF8StringLength;
68 
75 - (void)appendCString: (const char *)cString
76  encoding: (of_string_encoding_t)encoding;
77 
86 - (void)appendCString: (const char *)cString
87  encoding: (of_string_encoding_t)encoding
88  length: (size_t)cStringLength;
89 
99 - (void)appendFormat: (OFConstantString *)format, ...;
100 
111 - (void)appendFormat: (OFConstantString *)format
112  arguments: (va_list)arguments;
113 
119 - (void)prependString: (OFString *)string;
120 
124 - (void)reverse;
125 
129 - (void)uppercase;
130 
134 - (void)lowercase;
135 
143 - (void)capitalize;
144 
151 - (void)insertString: (OFString *)string
152  atIndex: (size_t)index;
153 
159 - (void)deleteCharactersInRange: (of_range_t)range;
160 
167 - (void)replaceCharactersInRange: (of_range_t)range
168  withString: (OFString *)replacement;
169 
176 - (void)replaceOccurrencesOfString: (OFString *)string
177  withString: (OFString *)replacement;
178 
189 - (void)replaceOccurrencesOfString: (OFString *)string
190  withString: (OFString *)replacement
191  options: (int)options
192  range: (of_range_t)range;
193 
198 
203 
208 
212 - (void)makeImmutable;
213 @end
214 
215 OF_ASSUME_NONNULL_END
void deleteTrailingWhitespaces()
Deletes all whitespaces at the end of the string.
Definition: OFMutableString.m:562
void deleteLeadingWhitespaces()
Deletes all whitespaces at the beginning of the string.
Definition: OFMutableString.m:544
void capitalize()
Capitalizes the string.
Definition: OFMutableString.m:441
A class for storing and modifying strings.
Definition: OFMutableString.h:26
A class for handling strings.
Definition: OFString.h:114
void deleteEnclosingWhitespaces()
Deletes all whitespaces at the beginning and the end of the string.
Definition: OFMutableString.m:589
void uppercase()
Converts the string to uppercase.
Definition: OFMutableString.m:425
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:37
A range.
Definition: OFObject.h:66
void lowercase()
Converts the string to lowercase.
Definition: OFMutableString.m:433
void makeImmutable()
Converts the mutable string to an immutable string.
Definition: OFMutableString.m:600
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:53
void reverse()
Reverses the string.
Definition: OFMutableString.m:411