當前位置:編程學習大全網 - 電腦編程 - 車床 斜線加圓弧如何編程幫我編下

車床 斜線加圓弧如何編程幫我編下

String.prototype.sub = function (n) {

var r = /[^\x00-\xff]/g;

if (this.replace(r, "mm").length <= n) return this;

// n = n - 3;

var m = Math.floor(n / 2);

for (var i = m; i < this.length; i++) {

if (this.substr(0, i).replace(r, "mm").length >= n) {

return this.substr(0, i);

}

  • 上一篇:c語言中壹分之壹加到十分之壹該怎麽寫,也就是1+二分之壹+三分之壹這樣,簡單點的
  • 下一篇:博途下載報故障原因201
  • copyright 2024編程學習大全網