Introduction to String Programming Guide
String Programming Guide describes how to create, search, concatenate, and draw strings. It also describes character sets, which let you search a string for characters in a group, and scanners, which convert numbers to strings and vice versa.
Who Should Read This Document
You should read this document if you need to work directly with strings or character sets.
Organization of This Document
This document contains the following articles:
Strings describes the characteristics of string objects in Cocoa and Cocoa Touch.
Creating and Converting String Objects explains the ways in which
NSString
and its subclassNSMutableString
create string objects and convert their contents to and from the various character encodings they support.Formatting String Objects describes how to format
NSString
objects.String Format Specifiers describes
printf
-style format specifiers supported byNSString
.Reading Strings From and Writing Strings To Files and URLs describes how to read strings from and write strings to files and URLs.
Searching, Comparing, and Sorting Strings describes methods for finding characters and substrings within strings and for comparing one string to another.
Words, Paragraphs, and Line Breaks describes how words, paragraphs, and line breaks are determined.
Characters and Grapheme Clusters describes how you can break strings down into user-perceived characters.
Character Sets explains how to use character set objects, and how to use
NSCharacterSet
methods to create standard and custom character sets.Scanners describes
NSScanner
objects, which interpret and convert the characters of anNSString
object into number and string values.String Representations of File Paths describes the
NSString
methods that manipulate strings as file-system paths.Drawing Strings discusses the methods of the
NSString
class that support drawing directly in anNSView
object.
See Also
For more information, refer to the following documents:
Attributed String Programming Guide is closely related to String Programming Guide. It provides information about
NSAttributedString
objects, which manage sets of attributes, such as font and kerning, that are associated with character strings or individual characters.Data Formatting Guide describes how to format data using objects that create, interpret, and validate text.
Internationalization and Localization Guide provides information about localizing strings in your project, including information on how string formatting arguments can be ordered.
String Programming Guide for Core Foundation in Core Foundation, discusses the Core Foundation opaque type CFString, which is toll-free bridged with the
NSString
class.
Copyright © 1997, 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-02-11