Long

expect class Long : Number, Comparable<Long> (source)

Represents a 64-bit signed integer.

Since Kotlin

1.0
actual class Long : Number, Comparable<Long> (source)

Represents a 64-bit signed integer.

Since Kotlin

1.1

Represents a 64-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type long.

Since Kotlin

1.0
actual class Long : Number, Comparable<Long> (source)

Represents a 64-bit signed integer.

Since Kotlin

1.3
actual class Long : Number, Comparable<Long> (source)

Represents a 64-bit signed integer.

Since Kotlin

1.8
actual class Long : Number, Comparable<Long> (source)

Represents a 64-bit signed integer.

Since Kotlin

1.8

Types

Link copied to clipboard
expect object Companion
Since Kotlin 1.0
actual object Companion
Since Kotlin 1.1
object Companion
Since Kotlin 1.0
actual object Companion
Since Kotlin 1.3
actual object Companion
Since Kotlin 1.8
actual object Companion
Since Kotlin 1.8

Properties

Link copied to clipboard
expect val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.2
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.2
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.2
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.3
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.8
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.8
Link copied to clipboard

Returns a Duration equal to this Long number of days.

Since Kotlin 1.6
Link copied to clipboard

Returns a Duration equal to this Long number of hours.

Since Kotlin 1.6
Link copied to clipboard

Returns a Duration equal to this Long number of microseconds.

Since Kotlin 1.6
Link copied to clipboard

Returns a Duration equal to this Long number of milliseconds.

Since Kotlin 1.6
Link copied to clipboard

Returns a Duration equal to this Long number of minutes.

Since Kotlin 1.6
Link copied to clipboard

Returns a Duration equal to this Long number of nanoseconds.

Since Kotlin 1.6
Link copied to clipboard

Returns a Duration equal to this Long number of seconds.

Since Kotlin 1.6
Link copied to clipboard
expect val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.2
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.2
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.2
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.3
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.8
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.8

Functions

Link copied to clipboard
expect infix fun and(other: Long): Long

Performs a bitwise AND operation between the two values.

Since Kotlin 1.0
actual infix fun and(other: Long): Long

Performs a bitwise AND operation between the two values.

Since Kotlin 1.1
infix fun and(other: Long): Long

Performs a bitwise AND operation between the two values.

Since Kotlin 1.0
actual infix external fun and(other: Long): Long

Performs a bitwise AND operation between the two values.

Since Kotlin 1.3
actual infix fun and(other: Long): Long

Performs a bitwise AND operation between the two values.

Since Kotlin 1.8
actual infix fun and(other: Long): Long

Performs a bitwise AND operation between the two values.

Since Kotlin 1.8
Link copied to clipboard
fun Long.coerceAtLeast(minimumValue: Long): Long

Ensures that this value is not less than the specified minimumValue.

Since Kotlin 1.0
Link copied to clipboard
fun Long.coerceAtMost(maximumValue: Long): Long

Ensures that this value is not greater than the specified maximumValue.

Since Kotlin 1.0
Link copied to clipboard

Ensures that this value lies in the specified range.

Since Kotlin 1.0
fun Long.coerceIn(minimumValue: Long, maximumValue: Long): Long

Ensures that this value lies in the specified range minimumValue..maximumValue.

Since Kotlin 1.0
Link copied to clipboard
expect operator fun compareTo(other: Byte): Int
expect operator fun compareTo(other: Double): Int
expect operator fun compareTo(other: Float): Int
expect operator fun compareTo(other: Int): Int
expect open operator override fun compareTo(other: Long): Int
expect operator fun compareTo(other: Short): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.0
actual inline operator fun compareTo(other: Byte): Int
actual inline operator fun compareTo(other: Double): Int
actual inline operator fun compareTo(other: Float): Int
actual inline operator fun compareTo(other: Int): Int
actual open operator override fun compareTo(other: Long): Int
actual inline operator fun compareTo(other: Short): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.1
operator fun compareTo(other: Byte): Int
operator fun compareTo(other: Double): Int
operator fun compareTo(other: Float): Int
operator fun compareTo(other: Int): Int
open operator override fun compareTo(other: Long): Int
operator fun compareTo(other: Short): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.0
actual inline operator fun compareTo(other: Byte): Int
actual inline operator fun compareTo(other: Double): Int
actual inline operator fun compareTo(other: Float): Int
actual inline operator fun compareTo(other: Int): Int
actual open operator external override fun compareTo(other: Long): Int
actual inline operator fun compareTo(other: Short): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.3
actual inline operator fun compareTo(other: Byte): Int
actual inline operator fun compareTo(other: Double): Int
actual inline operator fun compareTo(other: Float): Int
actual inline operator fun compareTo(other: Int): Int
actual open inline operator override fun compareTo(other: Long): Int
actual inline operator fun compareTo(other: Short): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.8
actual inline operator fun compareTo(other: Byte): Int
actual inline operator fun compareTo(other: Double): Int
actual inline operator fun compareTo(other: Float): Int
actual inline operator fun compareTo(other: Int): Int
actual open inline operator override fun compareTo(other: Long): Int
actual inline operator fun compareTo(other: Short): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.8
Link copied to clipboard
infix inline fun <T> Comparable<T>.compareTo(other: T): Int

Compares this object with the specified object for order. Returns zero if this object is equal to the specified other object, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.6
Link copied to clipboard
inline external fun <R : Any> Long.convert(): R
Since Kotlin 1.3
Link copied to clipboard

Counts the number of consecutive most significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4

Counts the number of consecutive most significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4
actual inline fun Long.countLeadingZeroBits(): Int

Counts the number of consecutive most significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4

Counts the number of consecutive most significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4

Counts the number of consecutive most significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.8

Counts the number of consecutive most significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.8
Link copied to clipboard
expect fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin 1.4
actual fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin 1.4
actual inline fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin 1.4
actual external fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin 1.4
actual inline fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin 1.8
actual inline fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin 1.8
Link copied to clipboard

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4
actual inline fun Long.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.4
actual inline fun Long.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.8
actual inline fun Long.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun dec(): Long

Returns this value decremented by one.

Since Kotlin 1.0
actual operator fun dec(): Long

Returns this value decremented by one.

Since Kotlin 1.1
operator fun dec(): Long

Returns this value decremented by one.

Since Kotlin 1.0
actual operator external fun dec(): Long

Returns this value decremented by one.

Since Kotlin 1.3
actual inline operator fun dec(): Long

Returns this value decremented by one.

Since Kotlin 1.8
actual inline operator fun dec(): Long

Returns this value decremented by one.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun div(other: Byte): Long
expect operator fun div(other: Int): Long
expect operator fun div(other: Long): Long
expect operator fun div(other: Short): Long

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.0
expect operator fun div(other: Double): Double
expect operator fun div(other: Float): Float

Divides this value by the other value.

Since Kotlin 1.0
actual inline operator fun div(other: Byte): Long
actual inline operator fun div(other: Int): Long
actual operator fun div(other: Long): Long
actual inline operator fun div(other: Short): Long

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.1
actual inline operator fun div(other: Double): Double
actual inline operator fun div(other: Float): Float

Divides this value by the other value.

Since Kotlin 1.1
operator fun div(other: Byte): Long
operator fun div(other: Int): Long
operator fun div(other: Long): Long
operator fun div(other: Short): Long

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.0
operator fun div(other: Double): Double
operator fun div(other: Float): Float

Divides this value by the other value.

Since Kotlin 1.0
actual inline operator fun div(other: Byte): Long
actual inline operator fun div(other: Int): Long
actual operator external fun div(other: Long): Long
actual inline operator fun div(other: Short): Long

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.3
actual inline operator fun div(other: Double): Double
actual inline operator fun div(other: Float): Float

Divides this value by the other value.

Since Kotlin 1.3
actual inline operator fun div(other: Byte): Long
actual inline operator fun div(other: Int): Long
actual operator fun div(other: Long): Long
actual inline operator fun div(other: Short): Long

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.8
actual inline operator fun div(other: Double): Double
actual inline operator fun div(other: Float): Float

Divides this value by the other value.

Since Kotlin 1.8
actual inline operator fun div(other: Byte): Long
actual inline operator fun div(other: Int): Long
actual operator fun div(other: Long): Long
actual inline operator fun div(other: Short): Long

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.8
actual inline operator fun div(other: Double): Double
actual inline operator fun div(other: Float): Float

Divides this value by the other value.

Since Kotlin 1.8
Link copied to clipboard
infix fun Long.downTo(to: Int): LongProgression

Returns a progression from this value down to the specified to value with the step -1.

Since Kotlin 1.0
Link copied to clipboard
expect open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.0
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.1
open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.0
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.3
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.8
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.8
Link copied to clipboard
inline fun Long.floorDiv(other: Byte): Long
inline fun Long.floorDiv(other: Int): Long
inline fun Long.floorDiv(other: Long): Long
inline fun Long.floorDiv(other: Short): Long

Divides this value by the other value, flooring the result to an integer that is closer to negative infinity.

Since Kotlin 1.5
Link copied to clipboard
expect open override fun hashCode(): Int
Since Kotlin 1.0
actual open override fun hashCode(): Int
Since Kotlin 1.1
actual open override fun hashCode(): Int
Since Kotlin 1.3
actual open override fun hashCode(): Int
Since Kotlin 1.8
actual open override fun hashCode(): Int
Since Kotlin 1.8
Link copied to clipboard
expect operator fun inc(): Long

Returns this value incremented by one.

Since Kotlin 1.0
actual operator fun inc(): Long

Returns this value incremented by one.

Since Kotlin 1.1
operator fun inc(): Long

Returns this value incremented by one.

Since Kotlin 1.0
actual operator external fun inc(): Long

Returns this value incremented by one.

Since Kotlin 1.3
actual inline operator fun inc(): Long

Returns this value incremented by one.

Since Kotlin 1.8
actual inline operator fun inc(): Long

Returns this value incremented by one.

Since Kotlin 1.8
Link copied to clipboard
expect fun inv(): Long

Inverts the bits in this value.

Since Kotlin 1.0
actual fun inv(): Long

Inverts the bits in this value.

Since Kotlin 1.1
fun inv(): Long

Inverts the bits in this value.

Since Kotlin 1.0
actual external fun inv(): Long

Inverts the bits in this value.

Since Kotlin 1.3
actual inline fun inv(): Long

Inverts the bits in this value.

Since Kotlin 1.8
actual inline fun inv(): Long

Inverts the bits in this value.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun minus(other: Byte): Long
expect operator fun minus(other: Double): Double
expect operator fun minus(other: Float): Float
expect operator fun minus(other: Int): Long
expect operator fun minus(other: Long): Long
expect operator fun minus(other: Short): Long

Subtracts the other value from this value.

Since Kotlin 1.0
actual inline operator fun minus(other: Byte): Long
actual inline operator fun minus(other: Double): Double
actual inline operator fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Long
actual operator fun minus(other: Long): Long
actual inline operator fun minus(other: Short): Long

Subtracts the other value from this value.

Since Kotlin 1.1
operator fun minus(other: Byte): Long
operator fun minus(other: Double): Double
operator fun minus(other: Float): Float
operator fun minus(other: Int): Long
operator fun minus(other: Long): Long
operator fun minus(other: Short): Long

Subtracts the other value from this value.

Since Kotlin 1.0
actual inline operator fun minus(other: Byte): Long
actual inline operator fun minus(other: Double): Double
actual inline operator fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Long
actual operator external fun minus(other: Long): Long
actual inline operator fun minus(other: Short): Long

Subtracts the other value from this value.

Since Kotlin 1.3
actual inline operator fun minus(other: Byte): Long
actual inline operator fun minus(other: Double): Double
actual inline operator fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Long
actual operator fun minus(other: Long): Long
actual inline operator fun minus(other: Short): Long

Subtracts the other value from this value.

Since Kotlin 1.8
actual inline operator fun minus(other: Byte): Long
actual inline operator fun minus(other: Double): Double
actual inline operator fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Long
actual operator fun minus(other: Long): Long
actual inline operator fun minus(other: Short): Long

Subtracts the other value from this value.

Since Kotlin 1.8
Link copied to clipboard
inline fun Long.mod(other: Byte): Byte
inline fun Long.mod(other: Int): Int
inline fun Long.mod(other: Long): Long
inline fun Long.mod(other: Short): Short

Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).

Since Kotlin 1.5
Link copied to clipboard
inline external fun <R : Number> Number.narrow(): R
Since Kotlin 1.3
Link copied to clipboard
expect infix fun or(other: Long): Long

Performs a bitwise OR operation between the two values.

Since Kotlin 1.0
actual infix fun or(other: Long): Long

Performs a bitwise OR operation between the two values.

Since Kotlin 1.1
infix fun or(other: Long): Long

Performs a bitwise OR operation between the two values.

Since Kotlin 1.0
actual infix external fun or(other: Long): Long

Performs a bitwise OR operation between the two values.

Since Kotlin 1.3
actual infix fun or(other: Long): Long

Performs a bitwise OR operation between the two values.

Since Kotlin 1.8
actual infix fun or(other: Long): Long

Performs a bitwise OR operation between the two values.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun plus(other: Byte): Long
expect operator fun plus(other: Double): Double
expect operator fun plus(other: Float): Float
expect operator fun plus(other: Int): Long
expect operator fun plus(other: Long): Long
expect operator fun plus(other: Short): Long

Adds the other value to this value.

Since Kotlin 1.0
actual inline operator fun plus(other: Byte): Long
actual inline operator fun plus(other: Double): Double
actual inline operator fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Long
actual operator fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Long

Adds the other value to this value.

Since Kotlin 1.1
operator fun plus(other: Byte): Long
operator fun plus(other: Double): Double
operator fun plus(other: Float): Float
operator fun plus(other: Int): Long
operator fun plus(other: Long): Long
operator fun plus(other: Short): Long

Adds the other value to this value.

Since Kotlin 1.0
actual inline operator fun plus(other: Byte): Long
actual inline operator fun plus(other: Double): Double
actual inline operator fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Long
actual operator external fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Long

Adds the other value to this value.

Since Kotlin 1.3
actual inline operator fun plus(other: Byte): Long
actual inline operator fun plus(other: Double): Double
actual inline operator fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Long
actual operator fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Long

Adds the other value to this value.

Since Kotlin 1.8
actual inline operator fun plus(other: Byte): Long
actual inline operator fun plus(other: Double): Double
actual inline operator fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Long
actual operator fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Long

Adds the other value to this value.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun rangeTo(other: Byte): LongRange
expect operator fun rangeTo(other: Int): LongRange
expect operator fun rangeTo(other: Long): LongRange
expect operator fun rangeTo(other: Short): LongRange

Creates a range from this value to the specified other value.

Since Kotlin 1.0
actual operator fun rangeTo(other: Byte): LongRange
actual operator fun rangeTo(other: Int): LongRange
actual operator fun rangeTo(other: Long): LongRange
actual operator fun rangeTo(other: Short): LongRange

Creates a range from this value to the specified other value.

Since Kotlin 1.1
operator fun rangeTo(other: Byte): LongRange
operator fun rangeTo(other: Int): LongRange
operator fun rangeTo(other: Long): LongRange
operator fun rangeTo(other: Short): LongRange

Creates a range from this value to the specified other value.

Since Kotlin 1.0
actual operator fun rangeTo(other: Byte): LongRange
actual operator fun rangeTo(other: Int): LongRange
actual operator fun rangeTo(other: Long): LongRange
actual operator fun rangeTo(other: Short): LongRange

Creates a range from this value to the specified other value.

Since Kotlin 1.3
actual operator fun rangeTo(other: Byte): LongRange
actual operator fun rangeTo(other: Int): LongRange
actual operator fun rangeTo(other: Long): LongRange
actual operator fun rangeTo(other: Short): LongRange

Creates a range from this value to the specified other value.

Since Kotlin 1.8
actual operator fun rangeTo(other: Byte): LongRange
actual operator fun rangeTo(other: Int): LongRange
actual operator fun rangeTo(other: Long): LongRange
actual operator fun rangeTo(other: Short): LongRange

Creates a range from this value to the specified other value.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun rangeUntil(other: Byte): LongRange
expect operator fun rangeUntil(other: Int): LongRange
expect operator fun rangeUntil(other: Long): LongRange
expect operator fun rangeUntil(other: Short): LongRange

Creates a range from this value up to but excluding the specified other value.

Since Kotlin 1.9
actual operator fun rangeUntil(other: Byte): LongRange
actual operator fun rangeUntil(other: Int): LongRange
actual operator fun rangeUntil(other: Long): LongRange
actual operator fun rangeUntil(other: Short): LongRange

Creates a range from this value up to but excluding the specified other value.

Since Kotlin 1.9
operator fun rangeUntil(other: Byte): LongRange
operator fun rangeUntil(other: Int): LongRange
operator fun rangeUntil(other: Long): LongRange
operator fun rangeUntil(other: Short): LongRange

Creates a range from this value up to but excluding the specified other value.

Since Kotlin 1.9
actual operator fun rangeUntil(other: Byte): LongRange
actual operator fun rangeUntil(other: Int): LongRange
actual operator fun rangeUntil(other: Long): LongRange
actual operator fun rangeUntil(other: Short): LongRange

Creates a range from this value up to but excluding the specified other value.

Since Kotlin 1.9
actual operator fun rangeUntil(other: Byte): LongRange
actual operator fun rangeUntil(other: Int): LongRange
actual operator fun rangeUntil(other: Long): LongRange
actual operator fun rangeUntil(other: Short): LongRange

Creates a range from this value up to but excluding the specified other value.

Since Kotlin 1.9
actual operator fun rangeUntil(other: Byte): LongRange
actual operator fun rangeUntil(other: Int): LongRange
actual operator fun rangeUntil(other: Long): LongRange
actual operator fun rangeUntil(other: Short): LongRange

Creates a range from this value up to but excluding the specified other value.

Since Kotlin 1.9
Link copied to clipboard
expect operator fun rem(other: Byte): Long
expect operator fun rem(other: Double): Double
expect operator fun rem(other: Float): Float
expect operator fun rem(other: Int): Long
expect operator fun rem(other: Long): Long
expect operator fun rem(other: Short): Long

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.1
actual inline operator fun rem(other: Byte): Long
actual inline operator fun rem(other: Double): Double
actual inline operator fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Long
actual operator fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Long

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.1
operator fun rem(other: Byte): Long
operator fun rem(other: Double): Double
operator fun rem(other: Float): Float
operator fun rem(other: Int): Long
operator fun rem(other: Long): Long
operator fun rem(other: Short): Long

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.1
actual inline operator fun rem(other: Byte): Long
actual inline operator fun rem(other: Double): Double
actual inline operator fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Long
actual operator external fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Long

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.3
actual inline operator fun rem(other: Byte): Long
actual inline operator fun rem(other: Double): Double
actual inline operator fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Long
actual operator fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Long

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.8
actual inline operator fun rem(other: Byte): Long
actual inline operator fun rem(other: Double): Double
actual inline operator fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Long
actual operator fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Long

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.8
Link copied to clipboard
expect fun Long.rotateLeft(bitCount: Int): Long

Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.6
actual fun Long.rotateLeft(bitCount: Int): Long

Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.6
actual inline fun Long.rotateLeft(bitCount: Int): Long

Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.6
actual fun Long.rotateLeft(bitCount: Int): Long

Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.6
actual fun Long.rotateLeft(bitCount: Int): Long

Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.8
actual fun Long.rotateLeft(bitCount: Int): Long

Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.8
Link copied to clipboard
expect fun Long.rotateRight(bitCount: Int): Long

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.6
actual inline fun Long.rotateRight(bitCount: Int): Long

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.6
actual inline fun Long.rotateRight(bitCount: Int): Long

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.6
actual inline fun Long.rotateRight(bitCount: Int): Long

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.6
actual inline fun Long.rotateRight(bitCount: Int): Long

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.8
actual inline fun Long.rotateRight(bitCount: Int): Long

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.8
Link copied to clipboard
expect infix fun shl(bitCount: Int): Long

Shifts this value left by the bitCount number of bits.

Since Kotlin 1.0
actual infix fun shl(bitCount: Int): Long

Shifts this value left by the bitCount number of bits.

Since Kotlin 1.1
infix fun shl(bitCount: Int): Long

Shifts this value left by the bitCount number of bits.

Since Kotlin 1.0
actual infix external fun shl(bitCount: Int): Long

Shifts this value left by the bitCount number of bits.

Since Kotlin 1.3
actual infix inline fun shl(bitCount: Int): Long

Shifts this value left by the bitCount number of bits.

Since Kotlin 1.8
actual infix inline fun shl(bitCount: Int): Long

Shifts this value left by the bitCount number of bits.

Since Kotlin 1.8
Link copied to clipboard
expect infix fun shr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.0
actual infix fun shr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.1
infix fun shr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.0
actual infix external fun shr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.3
actual infix inline fun shr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.8
actual infix inline fun shr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.8
Link copied to clipboard
inline external fun <R : Number> Number.signExtend(): R
Since Kotlin 1.3
Link copied to clipboard

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4
actual inline fun Long.takeHighestOneBit(): Long

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.8

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.8
Link copied to clipboard
expect fun Long.takeLowestOneBit(): Long

Returns a number having a single bit set in the position of the least significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4
actual fun Long.takeLowestOneBit(): Long

Returns a number having a single bit set in the position of the least significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4
actual inline fun Long.takeLowestOneBit(): Long

Returns a number having a single bit set in the position of the least significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4
actual fun Long.takeLowestOneBit(): Long

Returns a number having a single bit set in the position of the least significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.4
actual fun Long.takeLowestOneBit(): Long

Returns a number having a single bit set in the position of the least significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.8
actual fun Long.takeLowestOneBit(): Long

Returns a number having a single bit set in the position of the least significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun times(other: Byte): Long
expect operator fun times(other: Double): Double
expect operator fun times(other: Float): Float
expect operator fun times(other: Int): Long
expect operator fun times(other: Long): Long
expect operator fun times(other: Short): Long

Multiplies this value by the other value.

Since Kotlin 1.0
actual inline operator fun times(other: Byte): Long
actual inline operator fun times(other: Double): Double
actual inline operator fun times(other: Float): Float
actual inline operator fun times(other: Int): Long
actual operator fun times(other: Long): Long
actual inline operator fun times(other: Short): Long

Multiplies this value by the other value.

Since Kotlin 1.1
operator fun times(other: Byte): Long
operator fun times(other: Double): Double
operator fun times(other: Float): Float
operator fun times(other: Int): Long
operator fun times(other: Long): Long
operator fun times(other: Short): Long

Multiplies this value by the other value.

Since Kotlin 1.0
actual inline operator fun times(other: Byte): Long
actual inline operator fun times(other: Double): Double
actual inline operator fun times(other: Float): Float
actual inline operator fun times(other: Int): Long
actual operator external fun times(other: Long): Long
actual inline operator fun times(other: Short): Long

Multiplies this value by the other value.

Since Kotlin 1.3
actual inline operator fun times(other: Byte): Long
actual inline operator fun times(other: Double): Double
actual inline operator fun times(other: Float): Float
actual inline operator fun times(other: Int): Long
actual operator fun times(other: Long): Long
actual inline operator fun times(other: Short): Long

Multiplies this value by the other value.

Since Kotlin 1.8
actual inline operator fun times(other: Byte): Long
actual inline operator fun times(other: Double): Double
actual inline operator fun times(other: Float): Float
actual inline operator fun times(other: Int): Long
actual operator fun times(other: Long): Long
actual inline operator fun times(other: Short): Long

Multiplies this value by the other value.

Since Kotlin 1.8
Link copied to clipboard
inline fun Long.toBigDecimal(mathContext: MathContext): BigDecimal

Returns the value of this Long number as a BigDecimal.

Since Kotlin 1.2
Link copied to clipboard

Returns the value of this Long number as a BigInteger.

Since Kotlin 1.2
Link copied to clipboard
expect open override fun toByte(): Byte

Converts this Long value to Byte.

Since Kotlin 1.0
actual open override fun toByte(): Byte

Converts this Long value to Byte.

Since Kotlin 1.1
open override fun toByte(): Byte

Converts this Long value to Byte.

Since Kotlin 1.0
actual open external override fun toByte(): Byte

Converts this Long value to Byte.

Since Kotlin 1.3
actual open inline override fun toByte(): Byte

Converts this Long value to Byte.

Since Kotlin 1.8
actual open inline override fun toByte(): Byte

Converts this Long value to Byte.

Since Kotlin 1.8
Link copied to clipboard
expect open override fun toChar(): Char

Converts this Long value to Char.

Since Kotlin 1.0
actual open override fun toChar(): Char

Converts this Long value to Char.

Since Kotlin 1.1
open override fun toChar(): Char

Converts this Long value to Char.

Since Kotlin 1.0
actual open external override fun toChar(): Char

Converts this Long value to Char.

Since Kotlin 1.3
actual open inline override fun toChar(): Char

Converts this Long value to Char.

Since Kotlin 1.8
actual open inline override fun toChar(): Char

Converts this Long value to Char.

Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
expect open override fun toDouble(): Double

Converts this Long value to Double.

Since Kotlin 1.0
actual open override fun toDouble(): Double

Converts this Long value to Double.

Since Kotlin 1.1
open override fun toDouble(): Double

Converts this Long value to Double.

Since Kotlin 1.0
actual open external override fun toDouble(): Double

Converts this Long value to Double.

Since Kotlin 1.3
actual open override fun toDouble(): Double

Converts this Long value to Double.

Since Kotlin 1.8
actual open override fun toDouble(): Double

Converts this Long value to Double.

Since Kotlin 1.8
Link copied to clipboard

Returns a Duration equal to this Long number of the specified unit.

Since Kotlin 1.6
Link copied to clipboard
expect open override fun toFloat(): Float

Converts this Long value to Float.

Since Kotlin 1.0
actual open override fun toFloat(): Float

Converts this Long value to Float.

Since Kotlin 1.1
open override fun toFloat(): Float

Converts this Long value to Float.

Since Kotlin 1.0
actual open external override fun toFloat(): Float

Converts this Long value to Float.

Since Kotlin 1.3
actual open override fun toFloat(): Float

Converts this Long value to Float.

Since Kotlin 1.8
actual open override fun toFloat(): Float

Converts this Long value to Float.

Since Kotlin 1.8
Link copied to clipboard
fun Long.toHexString(format: HexFormat = HexFormat.Default): String

Formats this Long value using the specified format.

Since Kotlin 1.9
Link copied to clipboard
expect open override fun toInt(): Int

Converts this Long value to Int.

Since Kotlin 1.0
actual open override fun toInt(): Int

Converts this Long value to Int.

Since Kotlin 1.1
open override fun toInt(): Int

Converts this Long value to Int.

Since Kotlin 1.0
actual open external override fun toInt(): Int

Converts this Long value to Int.

Since Kotlin 1.3
actual open override fun toInt(): Int

Converts this Long value to Int.

Since Kotlin 1.8
actual open override fun toInt(): Int

Converts this Long value to Int.

Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.8
Link copied to clipboard
expect open override fun toLong(): Long

Returns this value.

Since Kotlin 1.0
actual open override fun toLong(): Long

Returns this value.

Since Kotlin 1.1
open override fun toLong(): Long

Returns this value.

Since Kotlin 1.0
actual open inline override fun toLong(): Long

Returns this value.

Since Kotlin 1.3
actual open inline override fun toLong(): Long

Returns this value.

Since Kotlin 1.8
actual open inline override fun toLong(): Long

Returns this value.

Since Kotlin 1.8
Link copied to clipboard
expect open override fun toShort(): Short

Converts this Long value to Short.

Since Kotlin 1.0
actual open override fun toShort(): Short

Converts this Long value to Short.

Since Kotlin 1.1
open override fun toShort(): Short

Converts this Long value to Short.

Since Kotlin 1.0
actual open external override fun toShort(): Short

Converts this Long value to Short.

Since Kotlin 1.3
actual open inline override fun toShort(): Short

Converts this Long value to Short.

Since Kotlin 1.8
actual open inline override fun toShort(): Short

Converts this Long value to Short.

Since Kotlin 1.8
Link copied to clipboard
expect open override fun toString(): String
Since Kotlin 1.0
actual open override fun toString(): String
Since Kotlin 1.1
open override fun toString(): String
Since Kotlin 1.0
actual open external override fun toString(): String
Since Kotlin 1.3
actual open override fun toString(): String
Since Kotlin 1.8
actual open override fun toString(): String
Since Kotlin 1.8
Link copied to clipboard
expect fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Since Kotlin 1.2
actual fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Since Kotlin 1.2
actual inline fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Since Kotlin 1.1
actual inline fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Since Kotlin 1.3
actual fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Since Kotlin 1.8
actual fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Since Kotlin 1.8
Link copied to clipboard
inline fun Long.toUByte(): UByte

Converts this Long value to UByte.

Since Kotlin 1.5
Link copied to clipboard
inline fun Long.toUInt(): UInt

Converts this Long value to UInt.

Since Kotlin 1.5
Link copied to clipboard
inline fun Long.toULong(): ULong

Converts this Long value to ULong.

Since Kotlin 1.5
Link copied to clipboard
inline fun Long.toUShort(): UShort

Converts this Long value to UShort.

Since Kotlin 1.5
Link copied to clipboard
expect operator fun unaryMinus(): Long

Returns the negative of this value.

Since Kotlin 1.0
actual operator fun unaryMinus(): Long

Returns the negative of this value.

Since Kotlin 1.1
operator fun unaryMinus(): Long

Returns the negative of this value.

Since Kotlin 1.0
actual operator external fun unaryMinus(): Long

Returns the negative of this value.

Since Kotlin 1.3
actual inline operator fun unaryMinus(): Long

Returns the negative of this value.

Since Kotlin 1.8
actual inline operator fun unaryMinus(): Long

Returns the negative of this value.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun unaryPlus(): Long

Returns this value.

Since Kotlin 1.0
actual inline operator fun unaryPlus(): Long

Returns this value.

Since Kotlin 1.1
operator fun unaryPlus(): Long

Returns this value.

Since Kotlin 1.0
actual inline operator fun unaryPlus(): Long

Returns this value.

Since Kotlin 1.3
actual inline operator fun unaryPlus(): Long

Returns this value.

Since Kotlin 1.8
actual inline operator fun unaryPlus(): Long

Returns this value.

Since Kotlin 1.8
Link copied to clipboard
infix fun Long.until(to: Byte): LongRange
infix fun Long.until(to: Int): LongRange
infix fun Long.until(to: Long): LongRange
infix fun Long.until(to: Short): LongRange

Returns a range from this value up to but excluding the specified to value.

Since Kotlin 1.0
Link copied to clipboard
expect infix fun ushr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Since Kotlin 1.0
actual infix fun ushr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Since Kotlin 1.1
infix fun ushr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Since Kotlin 1.0
actual infix external fun ushr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Since Kotlin 1.3
actual infix inline fun ushr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Since Kotlin 1.8
actual infix inline fun ushr(bitCount: Int): Long

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Since Kotlin 1.8
Link copied to clipboard
expect infix fun xor(other: Long): Long

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.0
actual infix fun xor(other: Long): Long

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.1
infix fun xor(other: Long): Long

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.0
actual infix external fun xor(other: Long): Long

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.3
actual infix fun xor(other: Long): Long

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.8
actual infix fun xor(other: Long): Long

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.8