Package kotlin
Core functions and types, available on all supported platforms.
Types
Annotation
Base interface implicitly implemented by all annotation interfaces. See Kotlin language documentation for more information on annotations.
interface AnnotationAny
The root of the Kotlin class hierarchy. Every Kotlin class has Any as a superclass.
open class AnyArray
Represents an array (specifically, a Java array when targeting the JVM platform). Array instances can be created using the arrayOf, arrayOfNulls and emptyArray standard library functions. See Kotlin language documentation for more information on arrays.
class Array<T>ArrayIndexOutOfBoundsException
open class ArrayIndexOutOfBoundsException :
IndexOutOfBoundsExceptionBoolean
Represents a value which is either true or false. On the JVM, non-nullable values of this type are
represented as values of the primitive type boolean.
class Boolean : Comparable<Boolean>BooleanArray
An array of booleans. When targeting the JVM, instances of this class are represented as boolean[].
class BooleanArrayByte
Represents a 8-bit signed integer.
On the JVM, non-nullable values of this type are represented as values of the primitive type byte.
class Byte : Number, Comparable<Byte>ByteArray
An array of bytes. When targeting the JVM, instances of this class are represented as byte[].
class ByteArrayChar
Represents a 16-bit Unicode character.
class Char : Comparable<Char>CharArray
An array of chars. When targeting the JVM, instances of this class are represented as char[].
class CharArrayCharSequence
Represents a readable sequence of Char values.
interface CharSequenceComparable
Classes which inherit from this interface have a defined total ordering between their instances.
interface Comparable<in T>Comparator
Provides a comparison function for imposing a total ordering between instances of the type T.
interface Comparator<T>typealias Comparator<T> = Comparator<T>DeprecationLevel
Possible levels of a deprecation. The level specifies how the deprecated element usages are reported in code.
enum class DeprecationLevelDouble
Represents a double-precision 64-bit IEEE 754 floating point number.
On the JVM, non-nullable values of this type are represented as values of the primitive type double.
class Double : Number, Comparable<Double>DoubleArray
An array of doubles. When targeting the JVM, instances of this class are represented as double[].
class DoubleArrayEnum
The common base class of all enum classes. See the Kotlin language documentation for more information on enum classes.
abstract class Enum<E : Enum<E>> : Comparable<E>class Enum<T : Enum<T>> : Comparable<Enum<T>>Float
Represents a single-precision 32-bit IEEE 754 floating point number.
On the JVM, non-nullable values of this type are represented as values of the primitive type float.
class Float : Number, Comparable<Float>FloatArray
An array of floats. When targeting the JVM, instances of this class are represented as float[].
class FloatArrayFunction
Represents a value of a functional type, such as a lambda, an anonymous function or a function reference.
interface Function<out R>IllegalCharacterConversionException
open class IllegalCharacterConversionException :
IllegalArgumentExceptionInt
Represents a 32-bit signed integer.
On the JVM, non-nullable values of this type are represented as values of the primitive type int.
class Int : Number, Comparable<Int>IntArray
An array of ints. When targeting the JVM, instances of this class are represented as int[].
class IntArrayKotlinVersion
Represents a version of the Kotlin standard library.
class KotlinVersion : Comparable<KotlinVersion>Lazy
Represents a value with lazy initialization.
interface Lazy<out T>LazyThreadSafetyMode
Specifies how a Lazy instance synchronizes initialization among multiple threads.
enum class LazyThreadSafetyModeLong
Represents a 64-bit signed integer.
On the JVM, non-nullable values of this type are represented as values of the primitive type long.
class Long : Number, Comparable<Long>LongArray
An array of longs. When targeting the JVM, instances of this class are represented as long[].
class LongArrayNothing
Nothing has no instances. You can use Nothing to represent "a value that never exists": for example, if a function has the return type of Nothing, it means that it never returns (always throws an exception).
class NothingNumber
Superclass for all platform classes representing numeric values.
abstract class NumberOutOfMemoryError
open class OutOfMemoryError : ErrorPair
Represents a generic pair of two values.
data class Pair<out A, out B> : SerializableShort
Represents a 16-bit signed integer.
On the JVM, non-nullable values of this type are represented as values of the primitive type short.
class Short : Number, Comparable<Short>ShortArray
An array of shorts. When targeting the JVM, instances of this class are represented as short[].
class ShortArrayString
The String class represents character strings. All string literals in Kotlin programs, such as "abc", are
implemented as instances of this class.
class String : Comparable<String>, CharSequenceSynchronized
typealias Synchronized = Synchronizedannotation class SynchronizedThrowable
The base class for all errors and exceptions. Only instances of this class can be thrown or caught.
open class ThrowableTriple
Represents a triad of values
data class Triple<out A, out B, out C> : SerializableUByte
class UByte : Comparable<UByte>UByteArray
class UByteArray : Collection<UByte>UInt
class UInt : Comparable<UInt>UIntArray
class UIntArray : Collection<UInt>ULong
class ULong : Comparable<ULong>ULongArray
class ULongArray : Collection<ULong>Unit
The type with only one value: the Unit object. This type corresponds to the void type in Java.
object UnitUShort
class UShort : Comparable<UShort>UShortArray
class UShortArray : Collection<UShort>Annotations
BuilderInference
Allows to infer generic type arguments of a function from the calls in the annotated function parameter of that function.
annotation class BuilderInferenceDeprecated
Marks the annotated declaration as deprecated.
annotation class DeprecatedDslMarker
When applied to annotation class X specifies that X defines a DSL language
annotation class DslMarkerExperimental
Signals that the annotated annotation class is a marker of an experimental API.
annotation class ExperimentalExperimentalMultiplatform
The experimental multiplatform support API marker.
annotation class ExperimentalMultiplatformExperimentalStdlibApi
This annotation marks the standard library API that is considered experimental and is not subject to the general compatibility guarantees given for the standard library: the behavior of such API may be changed or the API may be removed completely in any further release.
annotation class ExperimentalStdlibApiExperimentalUnsignedTypes
Marks the API that is dependent on the experimental unsigned types, including those types themselves.
annotation class ExperimentalUnsignedTypesExtensionFunctionType
Signifies that the annotated functional type represents an extension function.
annotation class ExtensionFunctionTypeMetadata
This annotation is present on any class file produced by the Kotlin compiler and is read by the compiler and reflection. Parameters have very short JVM names on purpose: these names appear in all generated class files, and we'd like to reduce their size.
annotation class MetadataOptIn
Allows to use the API denoted by the given markers in the annotated file, declaration, or expression. If a declaration is annotated with OptIn, its usages are not required to opt in to that API.
annotation class OptInOptionalExpectation
Marks an expected annotation class that it isn't required to have actual counterparts in all platforms.
annotation class OptionalExpectationParameterName
Annotates type arguments of functional type and holds corresponding parameter name specified by the user in type declaration (if any).
annotation class ParameterNamePublishedApi
When applied to a class or a member with internal visibility allows to use it from public inline functions and makes it effectively public.
annotation class PublishedApiReplaceWith
Specifies a code fragment that can be used to replace a deprecated function, property or class. Tools such as IDEs can automatically apply the replacements specified through this annotation.
annotation class ReplaceWithRequiresOptIn
Signals that the annotated annotation class is a marker of an API that requires an explicit opt-in.
annotation class RequiresOptInSinceKotlin
Specifies the first version of Kotlin where a declaration has appeared.
Using the declaration and specifying an older API version (via the -api-version command line option) will result in an error.
annotation class SinceKotlinSuppress
Suppresses the given compilation warnings in the annotated element.
annotation class SuppressUnsafeVariance
Suppresses errors about variance conflict
annotation class UnsafeVarianceUseExperimental
Allows to use experimental API denoted by the given markers in the annotated file, declaration, or expression. If a declaration is annotated with UseExperimental, its usages are not required to opt-in to that experimental API.
annotation class UseExperimentalExceptions
ArithmeticException
open class ArithmeticException : RuntimeExceptiontypealias ArithmeticException = ArithmeticExceptionAssertionError
open class AssertionError : Errortypealias AssertionError = AssertionErrorClassCastException
open class ClassCastException : RuntimeExceptiontypealias ClassCastException = ClassCastExceptionConcurrentModificationException
open class ConcurrentModificationException : RuntimeExceptiontypealias ConcurrentModificationException = ConcurrentModificationExceptionIllegalArgumentException
open class IllegalArgumentException : RuntimeExceptiontypealias IllegalArgumentException = IllegalArgumentExceptionIllegalStateException
open class IllegalStateException : RuntimeExceptiontypealias IllegalStateException = IllegalStateExceptionIndexOutOfBoundsException
open class IndexOutOfBoundsException : RuntimeExceptiontypealias IndexOutOfBoundsException = IndexOutOfBoundsExceptionKotlinNullPointerException
open class KotlinNullPointerException : NullPointerExceptionNoSuchElementException
open class NoSuchElementException : RuntimeExceptiontypealias NoSuchElementException = NoSuchElementExceptionNotImplementedError
An exception is thrown to indicate that a method body remains to be implemented.
class NotImplementedError : ErrorNoWhenBranchMatchedException
open class NoWhenBranchMatchedException : RuntimeExceptionopen class NoWhenBranchMatchedException : RuntimeExceptionNullPointerException
open class NullPointerException : RuntimeExceptiontypealias NullPointerException = NullPointerExceptionNumberFormatException
open class NumberFormatException : IllegalArgumentExceptiontypealias NumberFormatException = NumberFormatExceptionRuntimeException
open class RuntimeException : Exceptiontypealias RuntimeException = RuntimeExceptionTypeCastException
open class TypeCastException : ClassCastExceptionUninitializedPropertyAccessException
class UninitializedPropertyAccessException : RuntimeExceptionclass UninitializedPropertyAccessException : RuntimeExceptionopen class UninitializedPropertyAccessException :
RuntimeExceptionUnsupportedOperationException
open class UnsupportedOperationException : RuntimeExceptiontypealias UnsupportedOperationException = UnsupportedOperationExceptionExtensions for External Classes
Properties
isInitialized
Returns true if this lateinit property has been assigned a value, and false otherwise.
val KProperty0<*>.isInitialized: BooleanstackTrace
Returns an array of stack trace elements representing the stack trace pertaining to this throwable.
val Throwable.stackTrace: Array<StackTraceElement>Functions
also
Calls the specified function block with this value as its argument and returns this value.
fun <T> T.also(block: (T) -> Unit): Tapply
Calls the specified function block with this value as its receiver and returns this value.
fun <T> T.apply(block: T.() -> Unit): TarrayOf
Returns an array containing the specified elements.
fun <T> arrayOf(vararg elements: T): Array<T>arrayOfNulls
Returns an array of objects of the given type with the given size, initialized with null values.
fun <T> arrayOfNulls(size: Int): Array<T?>assert
Throws an AssertionError if the value is false and runtime assertions have been enabled on the JVM using the -ea JVM option.
fun assert(value: Boolean)Throws an AssertionError calculated by lazyMessage if the value is false and runtime assertions have been enabled on the JVM using the -ea JVM option.
fun assert(value: Boolean, lazyMessage: () -> Any)booleanArrayOf
Returns an array containing the specified boolean values.
fun booleanArrayOf(vararg elements: Boolean): BooleanArraycharArrayOf
Returns an array containing the specified characters.
fun charArrayOf(vararg elements: Char): CharArraycheck
Throws an IllegalStateException if the value is false.
fun check(value: Boolean)Throws an IllegalStateException with the result of calling lazyMessage if the value is false.
fun check(value: Boolean, lazyMessage: () -> Any)checkNotNull
Throws an IllegalStateException if the value is null. Otherwise returns the not null value.
fun <T : Any> checkNotNull(value: T?): TThrows an IllegalStateException with the result of calling lazyMessage if the value is null. Otherwise returns the not null value.
fun <T : Any> checkNotNull(
value: T?,
lazyMessage: () -> Any
): TComparator
Creates a Comparator with the provided comparison function.
fun <T> Comparator(
comparison: (a: T, b: T) -> Int
): Comparator<T>countLeadingZeroBits
Counts the number of consecutive most significant bits that are zero in the binary representation of this UInt number.
fun UInt.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this ULong number.
fun ULong.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this UByte number.
fun UByte.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this UShort number.
fun UShort.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this Byte number.
fun Byte.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this Short number.
fun Short.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this Int number.
fun Int.countLeadingZeroBits(): IntCounts the number of consecutive most significant bits that are zero in the binary representation of this Long number.
fun Long.countLeadingZeroBits(): IntcountOneBits
Counts the number of set bits in the binary representation of this UInt number.
fun UInt.countOneBits(): IntCounts the number of set bits in the binary representation of this ULong number.
fun ULong.countOneBits(): IntCounts the number of set bits in the binary representation of this UByte number.
fun UByte.countOneBits(): IntCounts the number of set bits in the binary representation of this UShort number.
fun UShort.countOneBits(): IntCounts the number of set bits in the binary representation of this Byte number.
fun Byte.countOneBits(): IntCounts the number of set bits in the binary representation of this Short number.
fun Short.countOneBits(): IntCounts the number of set bits in the binary representation of this Int number.
fun Int.countOneBits(): IntCounts the number of set bits in the binary representation of this Long number.
fun Long.countOneBits(): IntcountTrailingZeroBits
Counts the number of consecutive least significant bits that are zero in the binary representation of this UInt number.
fun UInt.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this ULong number.
fun ULong.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this UByte number.
fun UByte.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this UShort number.
fun UShort.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this Byte number.
fun Byte.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this Short number.
fun Short.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this Int number.
fun Int.countTrailingZeroBits(): IntCounts the number of consecutive least significant bits that are zero in the binary representation of this Long number.
fun Long.countTrailingZeroBits(): IntdoubleArrayOf
Returns an array containing the specified Double numbers.
fun doubleArrayOf(vararg elements: Double): DoubleArrayemptyArray
Returns an empty array of the specified type T.
fun <T> emptyArray(): Array<T>enumValueOf
Returns an enum entry with specified name.
fun <T : Enum<T>> enumValueOf(name: String): TenumValues
Returns an array containing enum T entries.
fun <T : Enum<T>> enumValues(): Array<T>error
Throws an IllegalStateException with the given message.
fun error(message: Any): NothingfloatArrayOf
Returns an array containing the specified Float numbers.
fun floatArrayOf(vararg elements: Float): FloatArraygetOrDefault
Returns the encapsulated value if this instance represents success or the defaultValue if it is failure.
fun <R, T : R> Result<T>.getOrDefault(defaultValue: R): RhashCode
Returns a hash code value for the object or zero if the object is null.
fun Any?.hashCode(): IntisFinite
Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).
fun Double.isFinite(): Booleanfun Float.isFinite(): BooleanisInfinite
Returns true if this value is infinitely large in magnitude.
fun Double.isInfinite(): Booleanfun Float.isInfinite(): BooleanisNaN
Returns true if the specified number is a
Not-a-Number (NaN) value, false otherwise.
fun Double.isNaN(): Booleanfun Float.isNaN(): Booleanlazy
Creates a new instance of the Lazy that uses the specified initialization function initializer and the default thread-safety mode LazyThreadSafetyMode.SYNCHRONIZED.
fun <T> lazy(initializer: () -> T): Lazy<T>Creates a new instance of the Lazy that uses the specified initialization function initializer.
fun <T> lazy(
mode: LazyThreadSafetyMode,
initializer: () -> T
): Lazy<T>fun <T> lazy(lock: Any?, initializer: () -> T): Lazy<T>let
Calls the specified function block with this value as its argument and returns its result.
fun <T, R> T.let(block: (T) -> R): RprintStackTrace
Prints the stack trace of this throwable to the standard output.
fun Throwable.printStackTrace()Prints the stack trace of this throwable to the specified writer.
fun Throwable.printStackTrace(writer: PrintWriter)Prints the stack trace of this throwable to the specified stream.
fun Throwable.printStackTrace(stream: PrintStream)require
Throws an IllegalArgumentException if the value is false.
fun require(value: Boolean)Throws an IllegalArgumentException with the result of calling lazyMessage if the value is false.
fun require(value: Boolean, lazyMessage: () -> Any)requireNotNull
Throws an IllegalArgumentException if the value is null. Otherwise returns the not null value.
fun <T : Any> requireNotNull(value: T?): TThrows an IllegalArgumentException with the result of calling lazyMessage if the value is null. Otherwise returns the not null value.
fun <T : Any> requireNotNull(
value: T?,
lazyMessage: () -> Any
): TrotateLeft
Rotates the binary representation of this UInt 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.
Rotates the binary representation of this ULong 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.
Rotates the binary representation of this UByte 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.
Rotates the binary representation of this UShort 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.
Rotates the binary representation of this Byte 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.
fun Byte.rotateLeft(bitCount: Int): ByteRotates the binary representation of this Short 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.
fun Short.rotateLeft(bitCount: Int): ShortrotateRight
Rotates the binary representation of this UInt 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.
Rotates the binary representation of this ULong 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.
Rotates the binary representation of this UByte 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.
Rotates the binary representation of this UShort 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.
Rotates the binary representation of this Byte 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.
fun Byte.rotateRight(bitCount: Int): ByteRotates the binary representation of this Short 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.
fun Short.rotateRight(bitCount: Int): Shortrun
Calls the specified function block and returns its result.
fun <R> run(block: () -> R): RCalls the specified function block with this value as its receiver and returns its result.
fun <T, R> T.run(block: T.() -> R): RrunCatching
Calls the specified function block and returns its encapsulated result if invocation was successful, catching any Throwable exception that was thrown from the block function execution and encapsulating it as a failure.
fun <R> runCatching(block: () -> R): Result<R>Calls the specified function block with this value as its receiver and returns its encapsulated result if invocation was successful,
catching any Throwable exception that was thrown from the block function execution and encapsulating it as a failure.
fun <T, R> T.runCatching(block: T.() -> R): Result<R>shortArrayOf
Returns an array containing the specified Short numbers.
fun shortArrayOf(vararg elements: Short): ShortArraysuspend
fun <R> suspend(block: suspend () -> R): suspend () -> RtakeHighestOneBit
Returns a number having a single bit set in the position of the most significant set bit of this UInt number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this ULong number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this UByte number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this UShort number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this Byte number, or zero, if this number is zero.
fun Byte.takeHighestOneBit(): ByteReturns a number having a single bit set in the position of the most significant set bit of this Short number, or zero, if this number is zero.
fun Short.takeHighestOneBit(): ShortReturns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.
fun Int.takeHighestOneBit(): IntReturns 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.
fun Long.takeHighestOneBit(): LongtakeIf
Returns this value if it satisfies the given predicate or null, if it doesn't.
fun <T> T.takeIf(predicate: (T) -> Boolean): T?takeLowestOneBit
Returns a number having a single bit set in the position of the least significant set bit of this UInt number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this ULong number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this UByte number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this UShort number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this Byte number, or zero, if this number is zero.
fun Byte.takeLowestOneBit(): ByteReturns a number having a single bit set in the position of the least significant set bit of this Short number, or zero, if this number is zero.
fun Short.takeLowestOneBit(): ShortReturns a number having a single bit set in the position of the least significant set bit of this Int number, or zero, if this number is zero.
fun Int.takeLowestOneBit(): IntReturns 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.
fun Long.takeLowestOneBit(): LongtakeUnless
Returns this value if it does not satisfy the given predicate or null, if it does.
fun <T> T.takeUnless(predicate: (T) -> Boolean): T?toBigDecimal
Returns the value of this Int number as a BigDecimal.
fun Int.toBigDecimal(): BigDecimalfun Int.toBigDecimal(mathContext: MathContext): BigDecimalReturns the value of this Long number as a BigDecimal.
fun Long.toBigDecimal(): BigDecimalfun Long.toBigDecimal(mathContext: MathContext): BigDecimalReturns the value of this Float number as a BigDecimal.
fun Float.toBigDecimal(): BigDecimalfun Float.toBigDecimal(mathContext: MathContext): BigDecimalReturns the value of this Double number as a BigDecimal.
fun Double.toBigDecimal(): BigDecimalfun Double.toBigDecimal(mathContext: MathContext): BigDecimaltoBigInteger
Returns the value of this Int number as a BigInteger.
fun Int.toBigInteger(): BigIntegerReturns the value of this Long number as a BigInteger.
fun Long.toBigInteger(): BigIntegertoBits
Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout.
fun Double.toBits(): LongReturns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.
fun Float.toBits(): IntTODO
Always throws NotImplementedError stating that operation is not implemented.
fun TODO(): Nothingfun TODO(reason: String): NothingtoRawBits
Returns a bit representation of the specified floating-point value as Long
according to the IEEE 754 floating-point "double format" bit layout,
preserving NaN values exact layout.
fun Double.toRawBits(): LongReturns a bit representation of the specified floating-point value as Int
according to the IEEE 754 floating-point "single format" bit layout,
preserving NaN values exact layout.
fun Float.toRawBits(): InttoString
Returns a string representation of the object. Can be called with a null receiver, in which case it returns the string "null".
fun Any?.toString(): StringUByteArray
Creates a new array of the specified size, where each element is calculated by calling the specified init function.
fun UByteArray(size: Int, init: (Int) -> UByte): UByteArrayubyteArrayOf
fun ubyteArrayOf(vararg elements: UByte): UByteArrayULongArray
Creates a new array of the specified size, where each element is calculated by calling the specified init function.
fun ULongArray(size: Int, init: (Int) -> ULong): ULongArrayulongArrayOf
fun ulongArrayOf(vararg elements: ULong): ULongArrayuse
Executes the given block function on this resource and then closes it down correctly whether an exception is thrown or not.
fun <T : AutoCloseable?, R> T.use(block: (T) -> R): RUShortArray
Creates a new array of the specified size, where each element is calculated by calling the specified init function.
fun UShortArray(
size: Int,
init: (Int) -> UShort
): UShortArrayushortArrayOf
fun ushortArrayOf(vararg elements: UShort): UShortArray