'*************测字符串长度************** Function CheckStringLength(txt) txt=trim(txt) x = len(txt) y = 0 for ii = 1 to x if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) 255 then '如果是汉字 y = y + 2 else y = y + 1 end if next CheckStringLength = y End Function '************* 截取字符串 ************** function InterceptString(txt,length) txt=trim(txt) x = len(tx...[ 查看全文 ]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[getEPnum]') and xtype in (N'FN', N'IF', N'TF')) drop function [dbo].[getEPnum] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[getstrcount]') and xtype in (N'FN', N'IF', N'TF')) drop function [db...[ 查看全文 ]
<% Function Encrypt(theNumber) On Error Resume Next Dim n, szEnc, t, HiN, LoN, i n = CDbl((theNumber + 1570) ^ 2 - 7 * (theNumber + 1570) - 450) If n < 0 Then szEnc = "R" Else szEnc = "J" n = CStr(abs(n)) For i = 1 To Len(n) step 2 t = Mid(n, i, 2) If Len(t) = 1 Then szEnc = szEnc & t Exit For End If HiN = (CInt(t) And 240) / 16 LoN = CInt(t) And 15 szEnc = szEnc &...[ 查看全文 ]