Public Function PadLeft(ByVal s As String, ByVal i As Integer, ByVal c As String)
    If i > LenB(s) Then
        PadLeft = String(i - LenB(StrConv(s, vbFromUnicode)), c) & s
    Else
        PadLeft = s
    End If
End Function
Public Function PadRight(ByVal s As String, ByVal i As Integer, ByVal c As String)
    If i > LenB(s) Then
        PadRight = s & String(i - LenB(StrConv(s, vbFromUnicode)), c)
    Else
        PadRight = s
    End If
End Function

posted on 2015-09-06 11:35  lbnnbs  阅读(1182)  评论(0编辑  收藏  举报