ObjFW  History of src/OFConstantString.m of fd7d3894ffd2ac2d

History of file src/OFConstantString.m at check-in fd7d3894ffd2ac2d

2025-01-01
14:17
OFUTF8String: Pack bools file: [a8d803e702] check-in: [ee1e04278a] user: js branch: trunk, size: 12604
12:58
Update copyright file: [3d00a1e2c3] check-in: [9d802a786d] user: js branch: trunk, size: 12551
2024-10-27
22:27
Allow strings to contain \0

In order to not accidentally have C strings with \0, an
OFInvalidEncodingException is thrown when trying to get a C string for a
string that contains \0.

In order to get a C string with \0 anyway, a new method
-[insecureCStringWithEncoding:] is added. file: [03e8d1030f] check-in: [6fbc3b18c7] user: js branch: trunk, size: 12551

2024-08-17
09:51
Move private functions into private headers file: [e8a18a09ea] check-in: [b829f3e798] user: js branch: trunk, size: 12529
2024-04-29
21:42
Properly hide private symbols file: [e20d1bfa3e] check-in: [f16bccc7b3] user: js branch: trunk, size: 12496
2024-04-03
02:16
Change license to LGPLv3 only file: [cde23b7b44] check-in: [7413a728a7] user: js branch: trunk, size: 12495
2024-01-02
17:17
Update copyright file: [745f0950c3] check-in: [26ddd2e4e4] user: js branch: trunk, size: 12287
2023-08-23
16:01
Remove incomplete NFD/NFKD support

It has been moved to the "unicode-normalization" branch until it is
ready. file: [a848ea510b] check-in: [149874777c] user: js branch: trunk, size: 12287

2023-08-09
09:08
Add OF_SINGLETON_METHODS file: [58e75bd4ee] check-in: [36310f6263] user: js branch: trunk, size: 12606
2023-01-06
09:04
Update copyright file: [01f4965770] check-in: [8939cbdb52] user: js branch: trunk, size: 12990
2022-11-24
00:21
Rename OFURI to OFIRI file: [5bcac2af70] check-in: [23272e6d43] user: js branch: trunk, size: 12990
2022-09-28
21:40
Rename OFUR{L -> I} in preparation for URI support file: [3adc07df05] check-in: [e7ab06503c] user: js branch: trunk, size: 12990
2022-09-04
18:27
Remove -[OFString stringByPrependingString:]

The same can be achieved using -[OFString stringByAppendingString:] and
swapping the order of arguments. file: [d0c2668f14] check-in: [114576fe94] user: js branch: trunk, size: 12990

2022-08-29
22:07
Make the base for parsing numbers an unsigned char file: [b62769ac16] check-in: [4d03f6f1a5] user: js branch: trunk, size: 13133
2022-08-07
20:22
OFConstantString: Fix missed method file: [d768085319] check-in: [0f50cc3858] user: js branch: trunk, size: 13113
2022-02-12
07:46
Update copyright file: [069ffd9312] check-in: [1a86b8175b] user: js branch: trunk, size: 12952
2021-04-18
22:56
Rename all symbols marked extern file: [a046d60efd] check-in: [e73c65a849] user: js branch: new-naming-convention, size: 12952
21:12
OF_RETAIN_COUNT_MAX -> OFMaxRetainCount file: [df00a8f5dc] check-in: [b06b86d6f9] user: js branch: new-naming-convention, size: 12958
2021-04-17
22:45
Rename of_(re)alloc and add OFFreeMemory file: [ef9244204c] check-in: [498074dab9] user: js branch: new-naming-convention, size: 12964
03:21
Rename all blocks file: [c17936e454] check-in: [c4e0e56fa3] user: js branch: new-naming-convention, size: 12952
02:25
Rename remaining enums in OFString.h file: [8b793fe13a] check-in: [169692a120] user: js branch: new-naming-convention, size: 12958
02:10
of_string_encoding_t -> OFStringEncoding file: [faa382b4c9] check-in: [255f21fb3d] user: js branch: new-naming-convention, size: 12839
01:35
of_char{16,32}_t -> OFChar{16,32} file: [656bf0717b] check-in: [6d9d790a24] user: js branch: new-naming-convention, size: 12863
01:32
of_unichar_t -> OFUnichar file: [233655cac1] check-in: [2d3790870d] user: js branch: new-naming-convention, size: 12875
00:44
of_range_t -> OFRange file: [0411bc7458] check-in: [d975c53a43] user: js branch: new-naming-convention, size: 12884
00:31
of_byte_order_t -> OFByteOrder file: [ae80fd102e] check-in: [1046d10a20] user: js branch: new-naming-convention, size: 12914
00:14
of_comparison_result_t -> OFComparisonResult file: [b966a92096] check-in: [61fc389aee] user: js branch: new-naming-convention, size: 12922
2021-04-07
22:20
Make GCC happy again file: [b52e6a55a7] check-in: [96ee4795ad] user: js branch: trunk, size: 12930
20:39
Override -[compare:] with a more specific type file: [415348861e] check-in: [91a4c53bb1] user: js branch: trunk, size: 12940
2021-03-07
20:25
*.m: Fold methods into one line where it fits file: [3252c9a3ca] check-in: [1b82d3bf4f] user: js branch: trunk, size: 12917
2021-01-02
22:04
Update copyright file: [41b6262c76] check-in: [374e1a1bfa] user: js branch: trunk, size: 13057
2020-11-14
12:23
Rename of_malloc and of_calloc

The new names should be more accurate. file: [1a5c26a192] check-in: [627511b032] user: js branch: trunk, size: 13146

2020-11-07
20:23
OFObject: Remove -[allocMemoryWithSize:] file: [4db8f4cb59] check-in: [4fbdca698c] user: js branch: trunk, size: 13140
2020-11-01
11:35
OFString: Add -[substring{From,To}Index:] file: [a6f51dcbb3] check-in: [4bbac7ab17] user: js branch: trunk, size: 14153
2020-10-10
14:27
OFObject: Change type of -[hash] to unsigned long

The internal hash is still 32 bit in most places, but this way, it is at
least not baked into the API and ABI and can be upgraded later, should
that ever be necessary. file: [0adc85a65a] check-in: [aeb403a1ed] user: js branch: trunk, size: 13913

2020-08-11
19:45
OFString: Rework number parsing API

This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). file: [0761b10d3a] check-in: [b6ee372b98] user: js branch: trunk, size: 13908

2020-04-21
22:47
OFWindowsRegistryKey: Compatibility with Win XP

This requires a slight API change to OFWindowsRegistryKey, as the
previous API was depending on RegGetValueW(), which is not available on
Windows XP. file: [1a9a1e4686] check-in: [94f1f0f479] user: js branch: trunk, size: 13694

2020-01-02
01:51
Update copyright file: [743f51b49a] check-in: [c7f0229795] user: js branch: trunk, size: 13519
2019-06-18
00:06
Fix typo to fix Win32 file: [3ec6ddd0a7] check-in: [c15164ca65] user: js branch: trunk, size: 13516
2019-06-17
02:33
Remove underscores from class names file: [7863900fc6] check-in: [17d57e01ff] user: js branch: trunk, size: 13508
2019-03-16
14:32
Naming consistency for 2 forgotten structs file: [5af702f073] check-in: [a2d31cca3d] user: js branch: trunk, size: 13487
2019-03-08
00:35
Use dot syntax file: [299aa74c88] check-in: [bceb7ed4c9] user: js branch: trunk, size: 13492
2019-02-03
19:19
Move a few URL methods from OFString to OFURL file: [e40123b4c3] check-in: [f19cde3a14] user: js branch: trunk, size: 13542
2019-01-03
19:13
Update copyright file: [6574951a62] check-in: [0509d7a844] user: js branch: trunk, size: 13710
2018-07-07
21:37
Add -[componentsSeparatedByCharactersInSet:] file: [59bf0a4519] check-in: [8939d24b51] user: js branch: trunk, size: 13704
2018-02-25
04:31
Reintroduce of_char{16,32}_t

There is no reliable way to check if C++ already defined those, as Clang
now defines char{16,32}_t even when it is not in C++ 11 mode. So we
cannot check if we are not in C++ 11 and then define them and otherwise
rely on the C++ 11 types. file: [32fee23859] check-in: [505137f25f] user: js branch: trunk, size: 13272

2018-01-15
00:34
Add -[writeToURL:] file: [37198b5a4e] check-in: [5c08717941] user: js branch: trunk, size: 13260
2018-01-03
19:49
Update copyright notice file: [1d7e2ea2cd] check-in: [7e5c81e186] user: js branch: trunk, size: 12979
2017-11-14
23:27
Add -[OFString stringByAppendingURLPathComponent:] file: [25aa3b8ad6] check-in: [ad18d4f976] user: js branch: trunk, size: 12956
2017-11-13
21:56
Add -[OFString indexOfCharacterFromSet:] file: [ee41b1b8bf] check-in: [4f2b0f0847] user: js branch: trunk, size: 12788
2017-11-05
18:25
Use -[isMemberOfClass:] instead of object_getClass file: [9ab7706adb] check-in: [0a4565fb0f] user: js branch: trunk, size: 12158
2017-10-22
15:05
Make Apple GCC with -Wshadow happy file: [8314c8c128] check-in: [a06354b42a] user: js branch: trunk, size: 12159
14:09
Make Apple GCC with -Wshadow happy file: [e45b7abf06] check-in: [31c0f5b89e] user: js branch: 0.90, size: 12068
2017-10-17
00:33
Do not use implicit method return types

Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. file: [aaf59fe08c] check-in: [2f4e0df8be] user: js branch: trunk, size: 12163

2017-10-01
13:43
More nullability and style fixes file: [58b7594810] check-in: [66c29a31f2] user: js branch: trunk, size: 12072
2017-07-23
18:02
Add -[OFString dataWithEncoding:] file: [a025049426] check-in: [db06863643] user: js branch: trunk, size: 12070
2017-07-02
13:21
Add -[decomposedStringWithCompatibilityMapping] file: [33c7229c0d] check-in: [7989a8db10] user: js branch: trunk, size: 11930
11:55
-[OFString decomposedStringWithCanonicalMapping] file: [3d83fd1fce] check-in: [beae8473fb] user: js branch: trunk, size: 11782
2017-05-07
21:25
Use char{16,32}_t instead of of_char{16,32}_t file: [76865d67da] check-in: [37d2a81754] user: js branch: trunk, size: 11605
20:10
Small code style change

Casts are now written like types in variable declarations. file: [606ccc29ff] check-in: [4af49a13c3] user: js branch: trunk, size: 11617

2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [5483ae8a87] check-in: [44f45c2e35] user: js branch: trunk, size: 11569

2016-09-12
00:27
Add OF_DEALLOC_UNSUPPORTED macro file: [e1f8d85588] check-in: [13f4c6c678] user: js branch: trunk, size: 11563
2016-05-22
17:38
Add -[OFString octalValue] file: [25ba828e39] check-in: [6ea8c2f107] user: js branch: trunk, size: 11675
2016-01-03
00:41
Update copyright

While at it, also update the mail address. file: [3401be807a] check-in: [2a27cf3000] user: js branch: trunk, size: 11588

2015-01-03
20:57
Update copyright file: [2aeb65a141] check-in: [cfd374b906] user: js branch: trunk, size: 11584
2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [340ec99b9c] check-in: [13ee56edf3] user: js branch: trunk, size: 11578

2014-05-15
04:07
Don't return void expressions file: [1ddb7fb002] check-in: [3c7bf2e50c] user: js branch: trunk, size: 11598
2014-02-26
18:38
Minor style change - no functional change file: [dca68d3ede] check-in: [e67130bd2d] user: js branch: trunk, size: 11626
2014-02-18
00:22
Move around a few defines to be more consistent file: [ca9a42565c] check-in: [f9d12201f8] user: js branch: trunk, size: 11627
2014-01-04
00:24
Update copyright. file: [02bdfaa851] check-in: [3b97fc3cd9] user: js branch: trunk, size: 11627
2013-11-23
01:27
Add OF_UNRECOGNIZED_SELECTOR. file: [bf1e5cc793] check-in: [6e19bd47ee] user: js branch: trunk, size: 11621
2013-06-22
12:12
Rework exceptions.

This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.

This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. file: [7d49a47280] check-in: [3d16a30f41] user: js branch: trunk, size: 11937

2013-05-01
20:35
Make -[finishInitialization] thread-safe.

This way, it's possible to use the same constant string from multiple
threads without having to make sure it's initialized first. file: [8447dff468] check-in: [abb7536cdd] user: js branch: trunk, size: 11993

2013-03-08
23:00
Take advantage of realloc(NULL, n) being defined. file: [9a6d67963b] check-in: [e8d6ca16e7] user: js branch: trunk, size: 11870
2013-03-04
17:20
Replace BOOL with bool.

The only places where BOOL is left are those where they are required by
the ABI. file: [9960343709] check-in: [c5ef582958] user: js branch: trunk, size: 11851

2013-02-12
18:22
Prefix all ivars with an underscore. file: [1a105f7a00] check-in: [e40729d406] user: js branch: trunk, size: 11850
2013-01-19
02:44
OFConstantString: Add missing methods. file: [02f6ef3191] check-in: [35491549a6] user: js branch: trunk, size: 11861
2013-01-12
17:29
Rename *UsingEncoding: to *WithEncoding:.

This reverts 5362941.

Even though *UsingEncoding: is what Foundation uses, *WithEncoding: is
more natural and is more consistent with the rest. Also, this means this
restores it to the API of 0.7. file: [eeb9601efb] check-in: [9ddd33a258] user: js branch: trunk, size: 10921

2013-01-09
22:24
Update copyright. file: [2975bd9973] check-in: [813c00ccf0] user: js branch: trunk, size: 10925
2012-12-22
15:37
Add -[doesNotRecognizeSelector:]. file: [4e1d37633d] check-in: [917ce5754c] user: js branch: trunk, size: 10919
2012-12-16
14:57
Add -[stringByAppendingFormat:arguments:]. file: [b86bf57c57] check-in: [aecadefe62] user: js branch: trunk, size: 11567
2012-12-15
23:31
OFString: Improved API for getting C strings. file: [2b5371b50c] check-in: [e2f4c1283c] user: js branch: trunk, size: 11355
2012-10-16
14:49
OFConstantString: Add a few missing new methods. file: [7dbd47e4c7] check-in: [e49548ce0f] user: js branch: trunk, size: 11351
14:47
A few more API improvements.

This should make it more future-proof, as adding new options is easier
than adding new methods for each and every combination of options. file: [4bef6d21b7] check-in: [fcaa549324] user: js branch: trunk, size: 10055

2012-10-13
21:29
Rename s->UTF8 to s->isUTF8. file: [f72b46effc] check-in: [9817eab3be] user: js branch: trunk, size: 10078
20:50
Move UTF-8 functions to OFString_UTF8.m. file: [0925478785] check-in: [9cfefe9c30] user: js branch: trunk, size: 10076
20:02
indexOfFirstOccurrenceOfString -> rangeOfString. file: [93ca41c6dc] check-in: [5209390938] user: js branch: trunk, size: 10076
2012-10-08
08:12
Coding style. file: [f6854092bd] check-in: [9276a1c3c8] user: js branch: trunk, size: 10060
2012-09-09
14:36
OFNumber: Implement OFComparing. file: [ed50b3697e] check-in: [56df9c44de] user: js branch: trunk, size: 10059
2012-09-06
19:13
Add -[OFString initWithUTF8String:freeWhenDone:]. file: [e519860738] check-in: [3659c87c63] user: js branch: trunk, size: 10045
2012-07-12
01:28
Don't access isa directly. file: [634c81749f] check-in: [8892ae9fcc] user: js branch: trunk, size: 10077
2012-06-10
13:28
More API improvements. file: [63e98f3fd3] check-in: [11d3d69a22] user: js branch: trunk, size: 9928
2012-03-15
11:29
Greatly improve OFObject's memory handling and performance.

A linked-list is put before each memory chunk allocated instead of
having an array of all memory chunks. This means only one malloc now
instead of one malloc and one realloc. This also means that when
checking reallocs and frees, it's no longer necessary to iterate through
all memory chunks, as the linked list also contains the owner, meaning
realloc and free are no longer O(n), but O(1) now.

As allocating bigger chunks seems to be a little bit slower than smaller
chunks, it seems that this is slightly slower in benchmarks if only very small
chunks are allocated. However, measuring real world usage, it's a lot faster. file: [e6c815e41d] check-in: [28170f5f65] user: js branch: trunk, size: 9959

2012-01-30
22:56
The new Apple runtime requires +[load] in OFConstantString. file: [1513456645] check-in: [08389242d9] user: js branch: trunk, size: 10212
2012-01-05
00:56
Update copyright. file: [cb5a866f0f] check-in: [ce70e17b38] user: js branch: trunk, size: 10212
2012-01-04
23:30
Work around objc_setFutureClass suddenly not working anymore on i386. file: [4bd82e6f82] check-in: [41fbb8c0a8] user: js branch: trunk, size: 10206
2011-12-06
02:02
Remove useless invocation of +[OFObject inheritMethodsFromClass:]. file: [916899ab02] check-in: [4f62045a3a] user: js branch: trunk, size: 9128
2011-11-20
18:41
Make OFString a class cluster.

It is a class cluster now, but there is still much to improve. file: [878ad12e02] check-in: [301ee63212] user: js branch: trunk, size: 9225

2011-10-31
22:02
Add -[UTF16String] to OFString. file: [31cc01efd6] check-in: [a51b3cb390] user: js branch: trunk, size: 13517
2011-10-29
01:36
Make return type of -[unicodeString] const. file: [e406c9d41b] check-in: [4d6f7fc529] user: js branch: trunk, size: 13390
00:00
Make the parameter for +[stringWith{Unicode,UTF16}String:] const. file: [30a97b7678] check-in: [49cf155269] user: js branch: trunk, size: 13384
2011-09-22
23:25
Exceptions are now autoreleased.

This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.

So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. file: [c74b1f841a] check-in: [e1e7ffa903] user: js branch: trunk, size: 13342

2011-09-19
12:34
BOOL naming conventions. file: [5b58150777] check-in: [d43eb177bc] user: js branch: trunk, size: 13181
2011-09-15
19:26
Add -[enumerateLinesUsingBlock:] to OFString. file: [993ed1e2bc] check-in: [6dd03a129e] user: js branch: trunk, size: 13183
2011-09-12
19:57
Rename -[cString] to -[UTF8String]. file: [7b7f10cde1] check-in: [e6fd39d11e] user: js branch: trunk, size: 12962
2011-08-04
16:48
Get rid of -[*FromIndex:toIndex:]. file: [5745a4d78a] check-in: [f977192a23] user: js branch: trunk, size: 12527
2011-07-29
21:34
OFConstantString: -[completeInitialization] -> -[finishInitialization]. file: [4fa86efffd] check-in: [2caeadf65a] user: js branch: trunk, size: 12726
2011-07-09
14:45
Cache the length of a string.

Also removes -[appendCStringWithoutUTF8Checking:] as it is dangerous and
not compatible with this optimization. file: [87992a22fc] check-in: [36e8a94f34] user: js branch: trunk, size: 12798

2011-07-08
20:13
Rename -[deleteLeadingAndTrailingWhitespaces]. file: [c1cbc7f938] check-in: [7c66260ead] user: js branch: trunk, size: 12777
19:15
Rename ivars in OFString struct to prevent prospective name conflicts. file: [d4339ab533] check-in: [3ffa55524a] user: js branch: trunk, size: 12795
15:29
Make it possible to add more ivars to OFConstantString. file: [9dcf20b1e7] check-in: [0b846bcc4a] user: js branch: trunk, size: 12966
2011-06-06
16:18
Remove semicolons that should not have been there. file: [e051d86f17] check-in: [65ec63f7c1] user: js branch: trunk, size: 3324
2011-03-24
19:42
Get rid of OFExceptions.h. file: [40257b41d9] check-in: [cda44767f4] user: js branch: trunk, size: 3325
2011-03-23
12:58
Make the return type of retainCount unsigned int.
This way, the OFObject protocol is compatible to NSObject.
file: [42c1e31ffa] check-in: [8de8df50e9] user: js branch: trunk, size: 3311
2011-01-15
18:17
Define enums as types. file: [5e08953a1a] check-in: [b5ec30fa9d] user: js branch: trunk, size: 3294
2011-01-01
20:19
Change license. file: [e612866855] check-in: [da6b3d26cb] user: js branch: trunk, size: 3300
2010-09-19
22:59
Optimize handling of ASCII strings. file: [1e07f47851] check-in: [f9ed4c1d11] user: js branch: trunk, size: 3044
2010-09-16
00:08
Added: Rename OFConstString to OFConstantString. file: [d070e3d08a] check-in: [68ef210228] user: js branch: trunk, size: 3011