MCPcopy Create free account
hub / github.com/microsoft/SandDance / rightmostDigit

Function rightmostDigit

docs/tests/v2/es6/js/sanddance.js:110081–110090  ·  view source on GitHub ↗
(str, dec)

Source from the content-addressed store, hash-verified

110079}
110080
110081function rightmostDigit(str, dec) {
110082 var i = str.lastIndexOf('e'),
110083 c;
110084 if (i > 0) return i;
110085
110086 for (i = str.length; --i > dec;) {
110087 c = str.charCodeAt(i);
110088 if (c >= 48 && c <= 57) return i + 1; // is digit
110089 }
110090}
110091},{"vega-scale":"N8iK","vega-time":"ErfR","vega-util":"d61Z","d3-format":"VuZR"}],"yZNT":[function(require,module,exports) {
110092"use strict";
110093

Callers 1

trimZeroesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected