This page was saved using jaction on 2006-09-04 8:34:06.
Address: http://flexdocs.kr/docs/flex2/langref/mx/utils/StringUtil.html
Title: mx.utils.StringUtil (Flex™ 2 레퍼런스 가이드)  •  Size: 22694
Packagemx.utils
Classpublic class StringUtil
InheritanceStringUtil Inheritance Object

StringUtil 유틸리티 클래스는, Flex 내에서 String object를 사용하기 위한 Methods를 가지는 완전하게 정적인 클래스입니다. StringUtil 의 인스턴스를 작성할 필요는 없습니다. 대신에 StringUtil.substitute() Methods등의 Methods를 호출합니다.



Public property
 property정의
 Inheritedconstructor : Object
특정의 object 인스턴스의 클래스 object 또는 constructor    함수에의 참조입니다.
Object
 Inheritedprototype : Object
[static] 클래스 또는 함수 object의 prototype object에의 참조입니다.
Object
Public Methods
 Methods정의
 InheritedhasOwnProperty (name:String ):Boolean
object로 지정된 property가 정의되고 있는지 어떤지를 나타냅니다.
Object
 InheritedisPrototypeOf (theClass:Object ):Boolean
Object 클래스의 인스턴스가, Parameters로서 지정된 object의 prototype 체인내에 있을지 어떨지를 나타냅니다.
Object
  isWhitespace (character:String ):Boolean
[static] 지정한 string가 단일의 공백, 탭, 복귀 캐릭터, 개행 캐릭터, 또는 용지 보내 캐릭터의 경우,true 를 돌려줍니다.
StringUtil
 InheritedpropertyIsEnumerable (name:String ):Boolean
지정된 property가 존재해, 열거 가능한가 어떤가를 나타냅니다.
Object
 InheritedsetPropertyIsEnumerable (name:String , isEnum:Boolean = true):void
루프 처리에 대한 다이나믹 property의 가용성을 설정합니다.
Object
  substitute (str:String , ... rest):String
[static] 지정한 string내의 "{n}" 토큰을, 건네받은 대응하는 Parameters와 옮겨놓습니다.
StringUtil
 InheritedtoString ():String
지정된 object의 string 표현을 돌려줍니다.
Object
  trim (str:String ):String
[static] 지정한 string의 선두와 말미로부터, 모든 공백 캐릭터를 삭제합니다.
StringUtil
 InheritedvalueOf ():Object
지정된 object의 원시적치를 돌려줍니다.
Object
Methods의 상세
isWhitespace()Methods
public static function isWhitespace(character:String ):Boolean

지정한 string가 단일의 공백, 탭, 복귀 캐릭터, 개행 캐릭터, 또는 용지 보내 캐릭터의 경우,true 를 돌려줍니다.

Parameters
character:String — 조회의 대상이 되고 있는 string입니다.

반환값
Boolean — 지정한 string가 단일의 공백, 탭, 복귀 캐릭터, 개행 캐릭터, 또는 용지 보내 캐릭터의 경우,true 가 됩니다.
substitute()Methods 
public static function substitute(str:String , ... rest):String

지정한 string내의 "{n}" 토큰을, 건네받은 대응하는 Parameters와 옮겨놓습니다.

Parameters
str:String — 값환을 실시하는 string입니다. 이 string에는 {n} 형식의 특수한 토큰을 포함할 수가 있습니다. 여기서,n 는 0 으로부터 시작되는 인덱스로, 지정되었을 경우, 그 인덱스로 검출된 추가 Parameters에 값환됩니다.
 
... rest — 각각의 {n} 위치에 있는 str Parameters내에서 값환가능인 추가 Parameters입니다. 여기서 n 는, 지정된 값의 배열의 (0 으로부터 시작된다) 정수 인덱스입니다. 최초의 Parameters가 배열의 경우, 이 배열은 Parameters 리스트로서 사용됩니다. 이것에 의해,... rest 서명을 사용하는 다른 Methods로 이 routine를 재사용할 수 있습니다. 다음에 예를 나타냅니다.
public function myTracer(str:String, ... rest) :void
      { 
label.text += StringUtil.substitute(str, rest) + "\n";
      } 

반환값
String — 모든 {n} 토큰이, 지정된 대응하는 Parameters와 값환된 새로운 string입니다.

Example
var str:String = "here is some info '{0}' and {1}"; trace(StringUtil.substitute(str, 15.4, true)); // 이것은 다음의 string를 출력합니다. // "here is some info '15.4' and true"

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

지정한 string의 선두와 말미로부터, 모든 공백 캐릭터를 삭제합니다.

Parameters
str:String — 공백을 삭제할 필요가 있는 string입니다.

반환값
String — 선두 및 마지막 공백을 삭제해 갱신된 string입니다.






 

코멘트가 추가되었을 경우, 메일로 받기. | 코멘트 리포트

현재의 페이지: http://flexdocs.kr/docs/flex2/langref/mx/utils/StringUtil.html