[ 파워빌더.공통함수 - RPAD LPAD ]
☞ | |
**** LPAD함수 만들어 사용하기 ***** //paturn으로 채우기 ================================================================================================== global type lpad from function_object forward prototypes global function string lpad (string as_data, char ac_paturn, integer ai_count); return as_data + fill(ac_paturn, ai_count - Len(as_data) ) //밴공백으로 채우기 ================================================================================================== global type lpad from function_object forward prototypes global function string lpad (string as_data, integer ai_count); return String( as_data, fill('@', ai_count) )
**** RPAD함수 만들어 사용하기 ***** //paturn으로 채우기... ================================================================================================== global type rpad from function_object forward prototypes global function string rpad (string as_data, char ac_paturn, integer ai_count); return Reverse( Reverse(as_data) + fill(ac_paturn, ai_count - Len(as_data) ) ) //빈공간으로 채우기 ================================================================================================== global type rpad from function_object forward prototypes global function string rpad (string as_data, integer ai_count); return Reverse( String(Reverse(as_data), fill('@', ai_count ) ) ) |
'파워빌더 > 공통함수' 카테고리의 다른 글
파워빌더.공통함수 - Old Media Player (0) | 2017.01.26 |
---|---|
파워빌더.공통함수 - key pad (0) | 2017.01.26 |
파워빌더.공통함수 - 문자열을 배열로 만들기 (0) | 2017.01.26 |
파워빌더.공통함수 - 음력을 양력으로 변환 (0) | 2017.01.26 |
파워빌더.공통함수 - 양력을 음력으로 변환 (0) | 2017.01.26 |