Generate toString implementation for unsigned types

This commit is contained in:
Ilya Gorbunov
2018-05-08 17:50:41 +03:00
parent e988ea5a1c
commit 0eee258fce
6 changed files with 42 additions and 1 deletions
@@ -127,6 +127,8 @@ public inline class UInt internal constructor(private val data: Int) : Comparabl
public fun toUInt(): UInt = this
public fun toULong(): ULong = data.toULong()
public override fun toString(): String = toLong().toString()
}
public fun Byte.toUInt(): UInt = UInt(this.toInt() and 0xFF)