C#2014. 11. 4. 09:39

// '0'으로 자릿수 채움!
        private string PadingLeftByZero(string strVal, int iCnt)
        {
            string retVal = strVal.PadLeft(iCnt, '0');
            return retVal;
        }
        // 공백으로 자릿수 채움!
        private string PadingLeftBySpace(string strVal, int iCnt)
        {
            string retVal = strVal.PadLeft(iCnt, ' ');
            return retVal;
        }
        // 공백으로 우측 자릿수 채움!
        private string PadingRightBySpace(string strVal, int iCnt)
        {
            string retVal = strVal.PadRight(iCnt, ' ');
            return retVal;
        }

Posted by 댓거리사랑