파워빌더.공통함수 - RPAD LPAD
[ 파워빌더.공통함수 - 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 ) ) ) |