Document Revision History

This table describes the changes to NSString Class Reference.

DateNotes
2014-02-11Noted that UTF16 and UTF32 are not allowable encodings for cStringUsingEncoding:.
 

See the special considerations section of cStringUsingEncoding:.

 

Added cross-references to getLineStart:end:contentsEnd:forRange: for methods that deal with line terminators.

2013-09-18Updated for OS X v10.9. Changed return types to instancetype. Added stringByAddingPercentEncoding-
WithAllowedCharacters: and stringByRemovingPercentEncoding methods.
 

Updated descriptions of compare:options:range:locale:, rangeOfString:options:range:locale:, and stringByFoldingWithOptions:locale: to correctly describe the default values of the locale argument.

 

Noted that writeToURL:atomically:encoding:error: and only supports file URLs.

 

Updated description of stringWithCString:encoding: to note that it does not supported 16-bit encodings.

 

Updated description of index argument of substringFromIndex: to indicate that it allows indexes up to the length of the string.

 

Added note that the extended attribute written by writeToFile:atomically:encoding:error: and writeToURL:atomically:encoding:error: may be lengthened in the future, and anyone reading the current content should guard appropriately against receiving longer content.

2013-01-28Removed example implementation of rangeOfComposedCharacterSequencesForRange: that was provided in rangeOfComposedCharacterSequenceAtIndex:.
2012-07-17Updated for OS X v10.8.
2012-06-11Clarified discussions of stringByReplacingOccurrencesOfString:withString: options:range:, stringByAddingPercentEscapesUsingEncoding:, pathExtension, lastPathComponent, writeToFile:atomically:encoding:error:, and writeToURL:atomically:encoding:error: methods. Fixed various typos.
2011-10-11Updated fileSystemRepresentation method to indicate it throws an exception on an empty string.
2011-06-06Updated for OS X v10.7. Added new methods for linguistic tagging.
 Updated for OS X v10.7. Added new methods for linguistic tagging.
2010-02-25Added new NSRegularExpressionSearch constant.
2009-08-28Noted that NSProprietaryStringEncoding has been deprecated.
2009-05-29Updated for OS X v10.6. Added and clarified information about string sorting, enumeration, and composed character sequence methods. Deprecated getCharacters: method. Made minor corrections throughout.
2009-02-04Changed the abstract of getCharacters: to more closely reflect that of getCharacters:range:.
2008-10-15Corrected return value of longLongValue. Rephrased the abstracts of all the rangeOfCharacter... and rangeOfString... methods, and corrected name mismatches in their parameter descriptions.
 

Rewrote description for the constant NSWidthInsensitiveSearch. Fixed bad cross reference in NSStringEncodingConversionOptions discussion. Added explanations of the effect of locale option on string comparison operations of compare:options:range:locale:, rangeOfString:options:range:locale:, and stringByFoldingWithOptions:locale:.

2008-03-11Added paragraph to introduction describing the byte-order assumptions of factory and initialization methods taking UTF-16 input.
 

Clarified descriptions of getLineStart:end:contentsEnd:forRange:, getParagraphStart:end:contentsEnd:forRange:, componentsSeparatedByCharactersInSet:, and componentsSeparatedByString:.

2008-02-08Corrected a typographical error.
2007-10-31Clarified the effect of the stringByStandardizingPath method.
2007-08-23Added discussion notes regarding comparison of strings to be presented to the user.
2007-07-19Augmented the description of required buffer sizes in getCharacters: and getCString:. Added a warning about passing NULL to stringWithUTF8String: and initWithUTF8String:.
2007-03-06Corrected discussion of initWithCharacters methods; clarified behavior of noCopy: creation methods on failure.
2007-02-08Enhanced the parameter descriptions for several methods.
2006-11-07Warned not to pass NULL into stringWithUTF8String:.
2006-10-03Augmented the description of required buffer sizes in the getCharacters: and getCString: methods.
2006-06-28Clarified the return value of dataUsingEncoding:.
2006-05-23Incorporated constants from Foundation Constants article.