套件 | mx.utils |
類別 | public class RPCStringUtil |
繼承 | RPCStringUtil Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
公用方法
方法 | 定義自 | ||
---|---|---|---|
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
[靜態]
Returns true if the specified string is
a single space, tab, carriage return, newline, or formfeed character. | RPCStringUtil | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
[靜態]
Substitutes "{n}" tokens within the specified string
with the respective arguments passed in. | RPCStringUtil | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
[靜態]
Removes all whitespace characters from the beginning and end
of the specified string. | RPCStringUtil | ||
[靜態]
Removes all whitespace characters from the beginning and end
of each element in an Array, where the Array is stored as a String. | RPCStringUtil | ||
會傳回指定之物件的基本值。 | Object |
方法詳細資訊
isWhitespace | () | 方法 |
public static function isWhitespace(character:String):Boolean
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Returns true
if the specified string is
a single space, tab, carriage return, newline, or formfeed character.
參數
character:String — The String that is is being queried.
|
Boolean — true if the specified string is
a single space, tab, carriage return, newline, or formfeed character.
|
substitute | () | 方法 |
public static function substitute(str:String, ... rest):String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Substitutes "{n}" tokens within the specified string with the respective arguments passed in.
參數
str:String — The string to make substitutions in.
This string can contain special tokens of the form
{n} , where n is a zero based index,
that will be replaced with the additional parameters
found at that index if specified.
| |
... rest — Additional parameters that can be substituted
in the str parameter at each {n}
location, where n is an integer (zero based)
index value into the array of values specified.
If the first parameter is an array this array will be used as
a parameter list.
This allows reuse of this routine in other methods that want to
use the ... rest signature.
For example public function myTracer(str:String, ... rest):void { label.text += StringUtil.substitute(str, rest) + "\n"; } |
String — New string with all of the {n} tokens
replaced with the respective arguments specified.
|
trim | () | 方法 |
public static function trim(str:String):String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Removes all whitespace characters from the beginning and end of the specified string.
參數
str:String — The String whose whitespace should be trimmed.
|
String — Updated String where whitespace was removed from the
beginning and end.
|
trimArrayElements | () | 方法 |
public static function trimArrayElements(value:String, delimiter:String):String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Removes all whitespace characters from the beginning and end of each element in an Array, where the Array is stored as a String.
參數
value:String — The String whose whitespace should be trimmed.
| |
delimiter:String — The String that delimits each Array element in the string.
|
String — Updated String where whitespace was removed from the
beginning and end of each element.
|
Tue Jun 12 2018, 03:47 PM Z