Documentation Archive Developer
Search
Top

WebScript Programmer's Quick Reference to Foundation Classes


As you learned in the previous chapter, when you write an application in WebScript, all values are objects, even simple values such as numbers or strings. The objects that represent strings, numbers, arrays, dictionaries, and other basic constructs are defined by classes in the Foundation framework. You use classes from the Foundation framework in virtually all WebScript applications.

This chapter gives you an overview of the Foundation framework classes most commonly used in WebScript. More detailed descriptions are provided by the class specifications in the Foundation Framework Reference. However, not all methods in these class specifications are available in WebScript. For example, some classes define methods that take structures as arguments or return structures, but because structures are not supported in WebScript, you cannot use these methods. For more information, see "WebScript for Objective-C Developers" in the previous chapter.

Foundation Objects
Representing Objects as Strings
Mutable and Immutable Objects
Determining Equality
Writing to and Reading From Files
Writing to Files
Reading From Files

Working With Strings

Commonly Used String Methods
Creating Strings
Combining and Dividing Strings
Comparing Strings
Converting String Contents
Modifying Strings
Storing Strings

Working With Arrays

Commonly Used Array Methods
Creating Arrays
Querying Arrays
Sorting Arrays
Adding and Removing Objects
Storing Arrays
Representing Arrays as Strings

Working With Dictionaries

Commonly Used Dictionary Methods
Creating Dictionaries
Querying Dictionaries
Adding, Removing, and Modifying Entries
Representing Dictionaries as Strings
Storing Dictionaries

Working With Dates and Times
The Calendar Format
Date Conversion Specifiers

Commonly Used Date Methods
Creating Dates
Adjusting a Date
Representing Dates as Strings
Retrieving Date Elements

First Section