Percentage.From

語法

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

關於

傳回所指定 percentage 中的 value 值。 如果指定的 value 為 null,Percentage.From 會傳回 null。 若所指定 value 是包含後置百分比符號的 text,則會傳回轉換後的十進位數字。 否則,值將會轉換成 number,使用 Number.From。 也可以提供選擇性的 culture (例如,"en-US")。

範例

取得 percentage 的 "12.3%" 值。

使用方式

Percentage.From("12.3%")

輸出

0.123