很多时候我们非程序员出身的同学,基础不好,所以我们在GEE中如何能将字符串转换成一个数字,这在我们需要插入一些数字就很实用。
ee.Number.parse(input, radix)
Convert a string to a number.
Arguments:
input (String):
The string to convert to a number.
radix (Integer, default: 10):
An integer representing the base number system from which to convert. If input is not an integer, radix must equal 10 or not be specified.
Returns: Number
ee.Number.parse(input, radix)。
将一个字符串转换成一个数字。
参数。
input(字符串)。
要转换为数字的字符串。
radix (Integer, default: 10):
一个代表要转换的基数系统的整数。如果输入的不是整数,radix必须等于10或者不指定。
返回。数字