VB.NET Function to set Padding


SUBMITTED BY: fairuzzbdy

DATE: June 17, 2016, 8:49 a.m.

FORMAT: Text only

SIZE: 510 Bytes

HITS: 5473

  1. Public Function setPadding(ByVal code As String, ByVal IntBagi As Integer, ByVal str As String, ByVal strPadding As String) As String
  2. Dim strRet As String = String.Empty
  3. Dim jmcode As Integer = code.Length
  4. Dim intjmloop As Integer = jmcode / IntBagi
  5. For i As Integer = 2 To intjmloop
  6. strRet &= strPadding
  7. Next
  8. If jmcode = IntBagi Then
  9. strRet = ""
  10. End If
  11. strRet &= str
  12. Return strRet
  13. End Function

comments powered by Disqus