팩토리 » Api

stringreplaceall

Description

문자열의 치환 대상 문자(열) 모두를 다른 문자(열)로 치환한다.

Parameters

Parameters Type Description
strString STRING 원본 문자열
strTargetStr STRING 치환 대상 문자(열)
strReplaceString STRING 치환할 문자(열)
bIgnoreCase BOOL [옵션] 대소문자 무시 여부 (기본값: false)

Return Value

Type Description
STRING 변환 처리된 문자열

Remark

strTargetStr 파라미터 값에 자바스크립트 정규식에서 특수 문자로 사용되는 문자에 대해서는 Escape 문자를 붙여서 값을 지정해야 한다.

Example

function btn_on_mouseup(objInst) { var strValue = "012304"; strValue = factory.stringreplaceall(strValue, "0", "A"); factory.consoleprint(strValue); // 결과값 : A123A4 }

See Also

stringreplaceat
stringrtrim
stringltrim

Viewer Ver.

9.1.1.1

Update Date

20221129