StrPad 函数 FOR ASP

类别:Asp 点击:0 评论:0 推荐:
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)
            End If
        End If
End Function

本文地址:http://com.8s8s.com/it/it7601.htm