标题:高手进
取消只看楼主
克隆狼
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-5-8
 问题点数:0 回复次数:0 
高手进
帮忙把下面的JS代码转成VB的,谢谢
function binl2b64(binarray)
       {
         var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
         var str = "";
         for(var i = 0; i < binarray.length * 4; i += 3)
         {
           var triplet = (((binarray[i    >> 2] >> 8 * ( i    %4)) & 0xFF) << 16)
                       | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
                       |   ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
           for(var j = 0; j < 4; j++)
           {
             if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
             else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
           }
         }
         return str;
       }
     </script>
搜索更多相关主题的帖子: var binarray triplet 
2008-05-09 05:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-213273-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.210105 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved