码迷,mamicode.com
首页 > 其他好文 > 详细

VB6 padleft padright

时间:2015-09-06 12:31:32      阅读:470      评论:0      收藏:0      [点我收藏+]

标签:

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

VB6 padleft padright

标签:

原文地址:http://www.cnblogs.com/lbnnbs/p/4785043.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!