Lang.html revision eb9b6f817df5c660be9f00fc5d27fe33479fdc98
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>API: yui Lang (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/api.css">
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
<h3>yui&nbsp; <span class="subtitle">3.00PR1</span></h3>
<p>
<a href="/index.html">Yahoo! UI Library</a>
&gt; <a href="/module_yui.html">yui</a>
&gt; Lang
</p>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form name="yui-classopts-form">
<span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> Show Private</span>
<span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> Show Protected</span>
<span id="classopts"><input type="checkbox" name="showdeprecated" id="showdeprecated" /> Show Deprecated</span>
</form>
<h2>
Class <b>Lang</b>
<span class="extends">
</span>
<span class="extends">
</span>
</code>
</h2>
<!-- class tree goes here -->
<div class="summary description">
Provides the language utilites and extensions used by the library
</div>
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="">
<h4>
<a name="method_isArray">isArray</a></h4>
<div class="detail">
<code>
boolean
<strong>isArray</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is an array.
Testing typeof/instanceof/constructor of arrays across frame
boundaries isn't possible in Safari unless you have a reference
to the other frame to test against its Array prototype. To
handle this case, we test well-known array properties instead.
properties.
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is an array</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isBoolean">isBoolean</a></h4>
<div class="detail">
<code>
boolean
<strong>isBoolean</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is a boolean
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is a boolean</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isDate">isDate</a></h4>
<div class="detail">
<code>
boolean
<strong>isDate</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the supplied object is a date instance
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is a date</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isFunction">isFunction</a></h4>
<div class="detail">
<code>
boolean
<strong>isFunction</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is a function
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is a function</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isNull">isNull</a></h4>
<div class="detail">
<code>
boolean
<strong>isNull</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is null
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is null</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isNumber">isNumber</a></h4>
<div class="detail">
<code>
boolean
<strong>isNumber</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is a legal number
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is a number</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isObject">isObject</a></h4>
<div class="detail">
<code>
boolean
<strong>isObject</strong>
(
o
,
failfn
)
</code>
<div class="description">
Determines whether or not the provided object is of type object
or function
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
<dd>
<code>failfn &lt;boolean&gt;</code>
fail if the input is a function
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is an object</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isString">isString</a></h4>
<div class="detail">
<code>
boolean
<strong>isString</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is a string
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is a string</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isUndefined">isUndefined</a></h4>
<div class="detail">
<code>
boolean
<strong>isUndefined</strong>
(
o
)
</code>
<div class="description">
Determines whether or not the provided object is undefined
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>o &lt;object&gt;</code>
The object to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if o is undefined</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_isValue">isValue</a></h4>
<div class="detail">
<code>
boolean
<strong>isValue</strong>
(
the
)
</code>
<div class="description">
A convenience method for detecting a legitimate non-null value.
Returns false for null/undefined/NaN, true for other values,
including 0/false/''
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>the &lt;object&gt;</code>
item to test
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if it is not null/undefined/NaN || false</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_trim">trim</a></h4>
<div class="detail">
<code>
string
<strong>trim</strong>
(
s
)
</code>
<div class="description">
Returns a string without any leading or trailing whitespace. If
the input is not a string, the input will be returned untouched.
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>s &lt;string&gt;</code>
the string to trim
</dd>
</dl>
<dl>
<dt>Returns:
<code>
string
</code></dt>
<dd>the trimmed string</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_anim.html">anim</a></li>
<li class=""><a href="module_anim-color.html">anim-color</a></li>
<li class=""><a href="module_anim-curve.html">anim-curve</a></li>
<li class=""><a href="module_anim-easing.html">anim-easing</a></li>
<li class=""><a href="module_anim-scroll.html">anim-scroll</a></li>
<li class=""><a href="module_anim-xy.html">anim-xy</a></li>
<li class=""><a href="module_attribute.html">attribute</a></li>
<li class=""><a href="module_base.html">base</a></li>
<li class=""><a href="module_dd-plugin.html">dd-plugin</a></li>
<li class=""><a href="module_event.html">event</a></li>
<li class=""><a href="module_get.html">get</a></li>
<li class=""><a href="module_io.html">io</a></li>
<li class=""><a href="module_loader.html">loader</a></li>
<li class=""><a href="module_node.html">node</a></li>
<li class=""><a href="module_node-class.html">node-class</a></li>
<li class=""><a href="module_node-region.html">node-region</a></li>
<li class=""><a href="module_node-screen.html">node-screen</a></li>
<li class=""><a href="module_Queue.html">Queue</a></li>
<li class="selected"><a href="module_yui.html">yui</a></li>
</ul>
</div>
<div class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="Array.html">Array</a></li>
<li class="selected"><a href="Lang.html">Lang</a></li>
<li class=""><a href="Object.html">Object</a></li>
<li class=""><a href="UA.html">UA</a></li>
<li class=""><a href="YUI.html">YUI</a></li>
</ul>
</div>
<div class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="yui-array.js.html">yui-array.js</a></li>
<li class=""><a href="yui-core.js.html">yui-core.js</a></li>
<li class=""><a href="yui-dump.js.html">yui-dump.js</a></li>
<li class=""><a href="yui-init.js.html">yui-init.js</a></li>
<li class=""><a href="yui-lang.js.html">yui-lang.js</a></li>
<li class=""><a href="yui-later.js.html">yui-later.js</a></li>
<li class=""><a href="yui-log.js.html">yui-log.js</a></li>
<li class=""><a href="yui-object.js.html">yui-object.js</a></li>
<li class=""><a href="yui-ua.js.html">yui-ua.js</a></li>
<li class=""><a href="yui.js.html">yui.js</a></li>
</ul>
</div>
<div class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><!--<code>boolean</code>-->
<a href="#method_isArray">isArray</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isBoolean">isBoolean</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isDate">isDate</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isFunction">isFunction</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isNull">isNull</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isNumber">isNumber</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isObject">isObject</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isString">isString</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isUndefined">isUndefined</a>
</li>
<li class=""><!--<code>boolean</code>-->
<a href="#method_isValue">isValue</a>
</li>
<li class=""><!--<code>string</code>-->
<a href="#method_trim">trim</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright &copy; 2008 Yahoo! Inc. All rights reserved.
</div>
</div>
</body>
</html>