Karelia Software's Cocoa Open Source

A random collection of useful bits of Cocoa, as found in Watson and in other sundry Karelia applications and testbeds. Feel free to adapt these for use in your Cocoa applications.


Output a dictionary suitable for attaching to an HTTP request /Foundation_Categories/NSDictionary
"Flatten" a string of HTML, removing all HTML tags /Foundation_Categories/NSString
NSFileManager: Resolve an alias /Foundation_Categories
NSSet or NSArray: Show the contents as a comma-separated list /Foundation_Categories
NSColor: Instantiate from Web-like Hex RRGGBB string /Foundation_Categories
NSCalendarDate: Short description plus relative dates like Today, Yesterday /Foundation_Categories
NSFileManager: Get the path within the user's Library directory /Foundation_Categories
Simple checksum of a string /Foundation_Categories/NSString
Return the range of a substring, searching between a starting and ending delimeters /Foundation_Categories/NSString
Split a string into an array of lines; unicode-aware /Foundation_Categories/NSString
General search-and-replace mechanism to convert given substrings /Foundation_Categories/NSString
Strip out anything in the string that is not a digit /Foundation_Categories/NSString
Return the range of a substring, inclusively from starting to ending delimeters /Foundation_Categories/NSString
Remove lines from a text file that start with # /Foundation_Categories/NSString
Parse a TSV string into an array of dictionaries /Foundation_Categories/NSString
Encode a string legally so it can be turned into an NSURL /Foundation_Categories/NSString
General search and replace, replacing strings found between starting and ending delimeters. /Foundation_Categories/NSString
Return an NSString composed of the given single unicode character /Foundation_Categories/NSString
Convert a string into an attributed string that looks like a hyperlink -- blue and underlined. /Foundation_Categories/NSString
Return a non-nil string for the given key /Foundation_Categories/NSDictionary
bzip2 decompression and compression /Foundation_Categories/NSData
Parse data as a property list /Foundation_Categories/NSData
Truncate a string to a desired width, appending ellipses... /Foundation_Categories/NSAttributedString
Parse some HTML data, and adjust the attributes /Foundation_Categories/NSData

· Karelia Home