Package-level declarations

Types

Link copied to clipboard
@RequiresOptIn(message = "Internal to the braccato modules; it may change without notice.")
annotation class InternalBraccatoApi

Marks what the braccato modules share among themselves and nobody else should use: it may change or go without notice. Using it takes an opt-in.

Properties

Link copied to clipboard
const val WS: String

JavaScript's \s.

Functions

Link copied to clipboard
fun jsNumber(input: String): Double

Number(string): the whole string as a number, 0 when it is blank, NaN when it is anything else.

Link copied to clipboard

Number.parseFloat: reads the longest prefix that is a decimal literal, NaN when there is none.

Link copied to clipboard
fun jsParseInt(input: String, radix: Int = 10): Double

Number.parseInt: reads the longest prefix of digits, NaN when there are none.

Link copied to clipboard
fun String.jsSplit(regex: Regex): List<String>

String.prototype.split with a regex, which splices every capture group into the result between the pieces. Kotlin's split leaves them out.

Link copied to clipboard

String.prototype.trim.

Link copied to clipboard

String.prototype.trimStart.