removeDecimalPart

fun Float.removeDecimalPart(): String

Remove decimal part when Float number has decimal part.

Example:

1.56F.removeDecimalPart() // 1.56
1.0F.removeDecimalPart() // 1

Since

1.1.0

See also


fun Double.removeDecimalPart(): String

Remove decimal part when Double number has decimal part.

Example:

1.56.removeDecimalPart() // 1.56
1.0.removeDecimalPart() // 1

Since

1.1.0

See also