ActionScript® 3.0 — dokumentacja dla platformy Adobe® Flash®
Strona główna  |  Ukryj listę pakietów i klas |  Pakiety  |  Klasy  |  Nowości  |  Indeks  |  Dodatki  |  Dlaczego język angielski?
Filtry: Pobieranie danych z serwera...
Pobieranie danych z serwera...
mx.utils 

StringUtil  - AS3 Flex

Pakietmx.utils
Klasapublic class StringUtil
DziedziczenieStringUtil Inheritance Object

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The StringUtil utility class is an all-static class with methods for working with String objects within Flex. You do not create instances of StringUtil; instead you call methods such as the StringUtil.substitute() method.



Właściwości publiczne
 WłaściwośćZdefiniowane przez
 Inheritedconstructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu.
Object
Metody publiczne
 MetodaZdefiniowane przez
 Inherited
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość.
Object
 Inherited
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr.
Object
  
[statyczny] Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.
StringUtil
 Inherited
Wskazuje, czy określona właściwość istnieje i jest przeliczalna.
Object
  
[statyczny] Returns a string consisting of a specified string concatenated with itself a specified number of times.
StringUtil
  
restrict(str:String, restrict:String):String
[statyczny] Removes "unallowed" characters from a string.
StringUtil
 Inherited
Ustawia dostępność właściwości dynamicznej używanej w pętlach.
Object
  
[statyczny] Substitutes "{n}" tokens within the specified string with the respective arguments passed in.
StringUtil
 Inherited
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych.
Object
 Inherited
Zwraca ciąg reprezentujący określony obiekt.
Object
  
[statyczny] Removes all whitespace characters from the beginning and end of the specified string.
StringUtil
  
[statyczny] Removes all whitespace characters from the beginning and end of each element in an Array, where the Array is stored as a String.
StringUtil
 Inherited
Zwraca pierwotną wartość dla określonego obiektu.
Object
Szczegół metody

isWhitespace

()metoda
public static function isWhitespace(character:String):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.

Parametry

character:String — The String that is is being queried.

Zwraca
Booleantrue if the specified string is a single space, tab, carriage return, newline, or formfeed character.

repeat

()metoda 
public static function repeat(str:String, n:int):String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.1
Wersje środowiska wykonawczego: Flash Player 10, AIR 1.5

Returns a string consisting of a specified string concatenated with itself a specified number of times.

Parametry

str:String — The string to be repeated.
 
n:int — The repeat count.

Zwraca
String — The repeated string.

restrict

()metoda 
public static function restrict(str:String, restrict:String):String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.1
Wersje środowiska wykonawczego: Flash Player 10, AIR 1.5

Removes "unallowed" characters from a string. A "restriction string" such as "A-Z0-9" is used to specify which characters are allowed. This method uses the same logic as the restrict property of TextField.

Parametry

str:String — The input string.
 
restrict:String — The restriction string.

Zwraca
String — The input string, minus any characters that are not allowed by the restriction string.

substitute

()metoda 
public static function substitute(str:String, ... rest):String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Substitutes "{n}" tokens within the specified string with the respective arguments passed in.

Parametry

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";
         } 

Zwraca
String — New string with all of the {n} tokens replaced with the respective arguments specified.

trim

()metoda 
public static function trim(str:String):String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Removes all whitespace characters from the beginning and end of the specified string.

Parametry

str:String — The String whose whitespace should be trimmed.

Zwraca
String — Updated String where whitespace was removed from the beginning and end.

trimArrayElements

()metoda 
public static function trimArrayElements(value:String, delimiter:String):String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: 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.

Parametry

value:String — The String whose whitespace should be trimmed.
 
delimiter:String — The String that delimits each Array element in the string.

Zwraca
String — Updated String where whitespace was removed from the beginning and end of each element.




[ X ]Dlaczego język angielski?
Treść dokumentacji języka ActionScript 3.0 wyświetlana w języku angielskim

Niektóre części dokumentacji języka ActionScript 3.0 nie są przetłumaczone na poszczególne języki. Gdy element nie jest przetłumaczony na dany język, jest wyświetlany tekst angielski. Na przykład opis klasy ga.controls.HelpBox nie jest przetłumaczony na żaden dodatkowy język. Z tego powodu polska wersja dokumentacji zawiera opis klasy ga.controls.HelpBox w języku angielskim.