팩토리 » Api
fillstring
Description
원본 문자열이 Max Length보다 작을 경우 파라미터로 준 문자 또는 문자열을
원본 문자열이 Max Length가 되도록 채워주는 API이다. Space또는 0을 Max Length만큼
채워서 문자열을 만들경우 사용가능 하다.
Parameters
Parameters |
Type |
Description |
strString |
STRING |
원본 문자열 |
strFillChar |
STRING |
Max Length만큰 채울 문자 또는 문자열 |
nMaxLength |
long |
Max Length |
bLead |
BOOL |
채움 문자를 원본 문자열 앞에 붙일건지 여부 |
nHangulByteLength |
short |
[옵션] 한글 한글자 바이트 크기 |
Return Value
Remark
nHangulByteLength 파라미터를 전달하지 않은 경우, 아스키 문자가 아닌 문자의 바이트 길이는 실행환경 파라미터인 DBMS_CHARSET 값에 의해서 결정된다.
Example
function bb_on_mouseup(objInst)
{
factory.consoleprint("-->> [" + factory.fillstring("123", "567", 10, true) + "]");
factory.consoleprint("-->> [" + factory.fillstring("123", "567", 10, false) + "]");
// 결과는 아래와같다
// -->> [7567567123]
// -->> [1235675675]
factory.consoleprint("-->> [" + factory.fillstring("123", " ", 10, true) + "]");
factory.consoleprint("-->> [" + factory.fillstring("123", " ", 10, false) + "]");
// 결과는 아래와같다
// -->> [ 123]
// -->> [123 ]
}
Viewer Ver.
9.1.1.1
Update Date
20190821