将包含科学记数法数字的字符串转换为数字
我问这个问题是为了看看是否有更简单的方法来做到这一点。我有一个 API
可以为我提供 8.419379055475514E7
作为答案,但我需要这个号码没有科学记数法,所以我不想在字符串中查找 E
来检测最后一个数字,而是想知道是否有东西已经做到了这一点,我是在 JS 和 API 上进行的是来自元数据库
。 谢谢!
查找 E
之前的最后一个数字,然后将其乘以 E
之后的数字。作品
I'm asking this to see if there is an easier way to do this.. I have an API
that gives me 8.419379055475514E7
as an answer, but I need the number with no scientific notation, so instead of looking for the E
in the string to detect the last number I want to know if there is something that already does this, I'm doing it on JS and the API is from Metabase
.
Thanks!
Looking for the last number before the E
, then multiply it by the number that is after the E
. Works
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论