While the WMLScript does not support a creation of the new objects via an
object-oriented programming, it do provides six "pre-built" libraries. These
library functions aid in the handling of many common tasks. These libraries
(with the brief description of each) includes:
Lang - This library contains the set of a functions that are closely related
to a WMLScript language core. Included in this library are the functions for a data
type manipulation, the absolute value calculations, and the random number generation.
Float - Float library is an optional and is the only supported on those clients
who have the floating-point capabilities. A typical functions provided by this library
includes the sqrt(), the round(), and the pow().
String - A String library contains the set of functions for performing the string
operations. Some of the functions which are included in this library are the length(),
the charAt(), the find(), the replace(), and finally the trim() function.
URL - This library do contains the set of a functions for handling both the
absolute URLs and also the relative URLs. A typical functions include the getPath(),
the getReferer(), and the getHost() function.
WMLBrowser - This library do contains the functions by which the WMLScript can
access an associated WML context. These functions should not have any side effects and
should return invalid in cases when the system does not support the WMLBrowser and
when the interpreter is not been invoked by an WML Browser. The commonly used
functions in this library are next(), getCurrentCard(), go(), prev() and the
refresh() function.
Dialogs - This library do contains the set of typical user interface functions
including the prompt(), the confirm(), and the alert() function.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.