Package-level declarations

Types

Link copied to clipboard
typealias MimeType = String

Represents the MIME type of content for use in operations involving media type definitions.

Functions

Link copied to clipboard

Converts the byte array into a Base64 encoded data URL string.

fun File.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFile(this).toString()): String
fun Path.asBase64DataUrl(mimeType: MimeType = ContentType.Companion .defaultForFilePath( fileName.toString(), ).asMimeType()): String

fun URL.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFilePath(this.path).asMimeType()): String

Converts the content of the URL into a Base64 encoded data URL string.

Link copied to clipboard

Converts a ContentType instance to its corresponding MIME type string representation.

Link copied to clipboard
fun String?.ellipsizeMiddle(maxLength: Int): String?

Truncates the string to the specified maximum length by replacing the middle portion with an ellipsis.