现在的位置: 首页 > 综合 > 正文

StrPad 函数 FOR ASP

2013年03月22日 ⁄ 综合 ⁄ 共 401字 ⁄ 字号 评论关闭
Function strPad(strSource, destLength, padChar, L_or_R)
        Dim srcLength
        srcLength = Len(strSource)
        If(srcLength >= destLength) Then
            strPad = strSource
        Else
            If(L_or_R = 0) Then         
                strPad = String(destLength - srcLength, padChar) & strSource
            Else
                strPad = strSource & String(destLength - srcLength, padChar)
            End If
        End If
End Function

抱歉!评论已关闭.