Percentage.From

语法

Percentage.From(value as any, optional culture as nullable text) as nullable number

关于

从给定的 value 返回 percentage 值。 如果给定的 value 为 null,则 Percentage.From 返回 null。 如果给定的 value 是带有尾随百分比符号的 text,则将返回转换的小数。 否则,请参阅 Number.From 将其转换为 number 值。 还可以提供可选 culture(例如“en-US”)。

示例 1

获取 "12.3%" 的 percentage 值。

使用情况

Percentage.From("12.3%")

输出

0.123

results matching ""

    No results matching ""