Calculation of lenb in JavaScript (ASP)

zhaozj2021-02-16  101

<% '================================================ =========== 'Function: leNB' =================================== ======================== Sub gsputjslenb ()%> Function flenb (character) {var count = 0; for (var i = 0; i < Character.Length; i ) {IF ((Character.Charcodeat (i)> 0 && Character.Charcodeat (i) <127) || (Character.Charcodeat (i)> 65376 && Character.Charcodeat (i) <65440))) {Count ;} else {count = 2;}} Return count;} <% end sub%> <% end sub%>

转载请注明原文地址:https://www.9cbs.com/read-10643.html

New Post(0)