kierans777
04/21/2022, 2:06 AMNSDecimal
from a String
. However I'm not sure how to as the NSDecimal
constructor only takes a NativePtr
argument. Can someone tell me how to do this please? 😄russhwolf
04/21/2022, 2:38 AMval nsDecimal = NSDeclmal(string = "123.456")
kierans777
04/21/2022, 2:41 AMkierans777
04/21/2022, 2:45 AMDecimal
from a string, I'm very confused here ...ephemient
04/21/2022, 3:47 AMNSDecimalNumber
and use .decimalNumber
to get a Swift-compatible Decimal
as neededkierans777
04/21/2022, 3:55 AM.decimalNumber
returns a CValue<NSDecimal>
I'm trying to create a function that returns a NSDecimal
and the compiler doesn't like returning a CValue<NSDecimal>
type kotlinx.cinterop.CValue<platform.Foundation.NSDecimal> of return value is not supported here: not a structure or too complex
Konstantin Tskhovrebov
04/22/2022, 1:50 PMfun foo(str: String): NSDecimal = NSDecimal(NSDecimalNumber(string = str).objcPtr())
does it work?kierans777
04/25/2022, 6:50 AMkierans777
04/25/2022, 6:51 AM