패키지 | mx.utils |
클래스 | public class StringUtil |
상속 | StringUtil Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
StringUtil.substitute()
method.
메서드 | 정의 주체 | ||
---|---|---|---|
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
[정적]
Returns true if the specified string is
a single space, tab, carriage return, newline, or formfeed character. | StringUtil | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
[정적]
Returns a string consisting of a specified string
concatenated with itself a specified number of times. | StringUtil | ||
[정적]
Removes "unallowed" characters from a string. | StringUtil | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
[정적]
Substitutes "{n}" tokens within the specified string
with the respective arguments passed in. | StringUtil | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
[정적]
Removes all whitespace characters from the beginning and end
of the specified string. | StringUtil | ||
[정적]
Removes all whitespace characters from the beginning and end
of each element in an Array, where the Array is stored as a String. | StringUtil | ||
지정된 객체의 프리미티브 값을 반환합니다. | 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.
|
repeat | () | 메서드 |
public static function repeat(str:String, n:int):String
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.1 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Returns a string consisting of a specified string concatenated with itself a specified number of times.
매개 변수
str:String — The string to be repeated.
| |
n:int — The repeat count.
|
String — The repeated string.
|
restrict | () | 메서드 |
public static function restrict(str:String, restrict:String):String
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.1 |
런타임 버전: | 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.
매개 변수
str:String — The input string.
| |
restrict:String — The restriction string.
|
String — The input string, minus any characters
that are not allowed by the restriction string.
|
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:17 PM Z