争怎路由网/网站教程/内容

StrPad 函数 FOR ASP

网站教程2024-06-13 阅读
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




……

相关阅读