Package-level declarations

Properties

Link copied to clipboard

Converts this Long from bytes -> gigabytes.

Link copied to clipboard

Converts this Long from bytes -> kilobytes.

Link copied to clipboard

Converts this Long from bytes -> megabytes.

Link copied to clipboard

Converts this Long from bytes -> terabytes.

Functions

Link copied to clipboard

Returns the humanized time of a nanosecond-precision time.

Link copied to clipboard
fun String.ellipsis(textLen: Int = 1995): String

Concat a string if it's over textLen.

Link copied to clipboard
fun <T> Iterable<T>.every(predicate: (T) -> Boolean): Boolean

Returns true if every element appears to be true from the predicate closure, otherwise it returns false.

Link copied to clipboard
fun <T> Iterable<T>.findIndex(predicate: (T) -> Boolean): Int

Returns the index from any elements that appears true from the predicate closure, otherwise, it returns false.

Link copied to clipboard
fun <T> List<T>.firstThenRest(): Pair<T, List<T>>

Returns a Pair from a List object which the first item is from the #first() function, and the second pair is the remaining arguments.

Link copied to clipboard
fun Long.humanize(long: Boolean = false, includeMs: Boolean = false): String

Returns the humanized time for a java.lang.Long instance

Link copied to clipboard
fun <T, U> T?.ifNotNull(body: T.() -> U): U?

Calls the body function if T was not null.

Link copied to clipboard
fun <T, U> T?.ifNull(body: () -> U): U?

Calls the body function if T was null.

Link copied to clipboard
fun Long.sizeToStr(long: Boolean = false): String

Format this Long into a readable byte format.

Link copied to clipboard

Upper cases the first letter of this String