CSDN专家博客精华版

为人民服务!
  首页  :: 新随笔  :: 管理

asp中以十六进制显示字串数据

Posted on 2007-12-17 11:22  csdnexpert  阅读(125)  评论(0编辑  收藏  举报
如何以十六进制显示字串数据?    

整理编辑:China ASP

答:sub ShowHex(data)
    dim l
    dim i
    dim ch
    l=lenB(data)
    for i = 1 to l
        ch=midB(data,i,1)
        h=trim(hex(ascB(ch)))
        if len(h)=1 then
           h="0"+h
        end if
        response.write h+" "
        if i mod 15 =0 then
           response.write "<br>"
        end if
    next
end sub

加入时间:1999-11-8
阅读次数:635



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=3387