ObjFW
OFMutableString.h
1 /*
2  * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
3  * Jonathan Schleifer <js@webkeks.org>
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: (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 
98 - (void)appendFormat: (OFConstantString*)format, ...;
99 
109 - (void)appendFormat: (OFConstantString*)format
110  arguments: (va_list)arguments;
111 
117 - (void)prependString: (OFString*)string;
118 
122 - (void)reverse;
123 
127 - (void)uppercase;
128 
132 - (void)lowercase;
133 
141 - (void)capitalize;
142 
149 - (void)insertString: (OFString*)string
150  atIndex: (size_t)index;
151 
157 - (void)deleteCharactersInRange: (of_range_t)range;
158 
165 - (void)replaceCharactersInRange: (of_range_t)range
166  withString: (OFString*)replacement;
167 
174 - (void)replaceOccurrencesOfString: (OFString*)string
175  withString: (OFString*)replacement;
176 
187 - (void)replaceOccurrencesOfString: (OFString*)string
188  withString: (OFString*)replacement
189  options: (int)options
190  range: (of_range_t)range;
191 
196 
201 
206 
210 - (void)makeImmutable;
211 @end
212 
213 OF_ASSUME_NONNULL_END
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:50
void capitalize()
Capitalizes the string.
Definition: OFMutableString.m:428
void deleteTrailingWhitespaces()
Deletes all whitespaces at the end of the string.
Definition: OFMutableString.m:525
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:37
void makeImmutable()
Converts the mutable string to an immutable string.
Definition: OFMutableString.m:555
A class for handling strings.
Definition: OFString.h:91
void reverse()
Reverses the string.
Definition: OFMutableString.m:399
A class for storing and modifying strings.
Definition: OFMutableString.h:26
A range.
Definition: OFObject.h:65
void deleteLeadingWhitespaces()
Deletes all whitespaces at the beginning of the string.
Definition: OFMutableString.m:510
void lowercase()
Converts the string to lowercase.
Definition: OFMutableString.m:420
void uppercase()
Converts the string to uppercase.
Definition: OFMutableString.m:412
void deleteEnclosingWhitespaces()
Deletes all whitespaces at the beginning and the end of the string.
Definition: OFMutableString.m:544