1 Replies - 1137 Views - Last Post: 29 May 2008 - 05:33 AM

#1 Chubber  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 131
  • Joined: 16-October 06

LeftPad

Posted 12 June 2007 - 05:19 AM

Description: Left pads the input string to the desired length with the given padding character
Function LeftPad(strIn, strPad, iLen)
     'Left pads the input string to the desired length with the given padding character
     'Does not truncate
     If Len(strIn) < iLen Then
          LeftPad = String((iLen - Len(strIn)), strPad) & strIn
     Else
          LeftPad = strIn
     End If
End Function

Is This A Good Question/Topic? 0
  • +

Replies To: LeftPad

#2 Trogdor  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 15
  • View blog
  • Posts: 627
  • Joined: 06-October 06

Re: LeftPad

Posted 29 May 2008 - 05:33 AM

carefull to only work with single character padding.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1