spark.validators.supportClasses

# GlobalizationUtils - AS3 Flex

Package | spark.validators.supportClasses
Class | public class GlobalizationUtils
Inheritance | GlobalizationUtils Object

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

GlobalizationUtils is a class containing Unicode related functionality not supported directly in Flex or ActionScript.

This class contains the utility routines needed for all Validators. Examples of typical routines are checking for unicode white space, trimming all spaces in a string at the beginning and end.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isDigit(ccode:uint):Boolean [static] Return true if a codepoint is a numeric digit. | GlobalizationUtils
|  | isLeadingSurrogate(ccode:uint):Boolean [static] Return true if a codepoint is a leading surrogate. | GlobalizationUtils
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | isTrailingSurrogate(ccode:uint):Boolean [static] Return true if a codepoint is a trailing surrogate. | GlobalizationUtils
|  | isWhiteSpace(ccode:uint):Boolean [static] Return true if a codepoint is a white space character. | GlobalizationUtils
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | surrogateToUTF32(c0:uint, c1:uint):uint [static] Convert a surrogate pair to UTF32. | GlobalizationUtils
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | trim(input:String):String [static] Removes leading and trailing white space characters. | GlobalizationUtils
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Method Detail

### isDigit

()
method

`public static function isDigit(ccode:uint):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

Return `true` if a codepoint is a numeric digit. Supported digits are listed in `flash.globalization.NationalDigitsType`.

Parameters

| `ccode:uint` — input codepoint

Returns

| `Boolean` — `true` if a codepoint is a numeric digit.

### isLeadingSurrogate

()
method

`public static function isLeadingSurrogate(ccode:uint):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

Return `true` if a codepoint is a leading surrogate.

Parameters

| `ccode:uint` — The input codepoint.

Returns

| `Boolean` — `true` if a codepoint is a leading surrogate, and `false` if not.

### isTrailingSurrogate

()
method

`public static function isTrailingSurrogate(ccode:uint):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

Return `true` if a codepoint is a trailing surrogate.

Parameters

| `ccode:uint` — The input codepoint.

Returns

| `Boolean` — `true` if a codepoint is a trailing surrogate, and `false` if not.

### isWhiteSpace

()
method

`public static function isWhiteSpace(ccode:uint):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

Return `true` if a codepoint is a white space character. Supports all unicode white space characters.

The unicode supported white spaces are:

          ASCII_SPACE (0x20)
          NO_BREAK_SPACE (0xA0)
          UNICODE_OGHAM_SPACE_MARK (0x1680)
          Unicode spaces 0x2000 - 0x200B
          UNICODE_NARROW_NOBREAK_SPACE (0x202F)
          UNICODE_MEDIUM_MATHEMATICAL_SPACE (0x205F)
          UNICODE_IDEOGRAPHIC_SPACE (0x3000)
          UNICODE_ZEROWIDTH_NOBREAK_SPACE (0xFEFF)

Parameters

| `ccode:uint` — The input codepoint.

Returns

| `Boolean` — `true` if a codepoint is a white space character, and `false` if not.

### surrogateToUTF32

()
method

`public static function surrogateToUTF32(c0:uint, c1:uint):uint`

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

Convert a surrogate pair to UTF32.

Parameters

| `c0:uint` — High surrogate.
| `c1:uint` — Low surrogate.

Returns

| `uint` — The UTF32 equivalent.

### trim

()
method

`public static function trim(input:String):String`

Language Version: | ActionScript 3.0

Product Version: | Flex 4.5

Runtime Versions: | Flash Player 10.1, AIR 2.5

Removes leading and trailing white space characters.

Parameters

| `input:String` — Input string to process.

Returns

| `String` — String after removing leading and trailing white space characters.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00