Package-level declarations

Types

Link copied to clipboard
object Escape

Utilities for escaping and unescaping strings for various targets.

Link copied to clipboard
sealed interface EscapeTarget

Represents a target (commonly a language or format) that strings can be escaped for.

Link copied to clipboard
object IOUtils

Utility methods for file-based operations.

Link copied to clipboard
class ScopedCounter(maxDepth: Int, onOverflow: () -> Nothing)

A thread-safe counter that tracks a depth value within nested scopes.

Link copied to clipboard
sealed interface StringCase

A general purpose strategy to transform a string to a specific case type.

Link copied to clipboard
sealed interface UnescapeTarget

Represents a target (commonly a language or format) that strings can be unescaped from.

Properties

Link copied to clipboard

Whether this string is a valid URL.

Link copied to clipboard

Name of the enum in kebab-case. Example: TOP_LEFT_CORNER ->top-left-corner

Functions

Link copied to clipboard

Transforms this string to a specific case.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun CharSequence.indent(indent: String): <Error class: unknown class>

Indents each line of this string by indent.

Link copied to clipboard
fun <T> Sequence<T>.iterator(consumeAmount: Int): Iterator<T>
Link copied to clipboard
fun <T, R> List<T>.mapParallel(minItems: Int = DEFAULT_MIN_ITEMS_FOR_PARALLELISM, transform: (T) -> R): List<R>

Maps each element of this list using transform, executing transformations in parallel when the list is large enough to benefit from concurrency. Falls back to sequential mapping for small lists where parallelism overhead exceeds benefit.

Link copied to clipboard
fun <T> Iterator<T>.nextOrNull(): T?
Link copied to clipboard
fun IntRange.offset(offset: Int): IntRange

Returns a new IntRange with the specified offset added to both the start and end of the range.

Link copied to clipboard
fun String.removeOptionalPrefix(prefix: String, ignoreCase: Boolean = false): Pair<String, Boolean>
Link copied to clipboard
fun StringBuilder.replace(oldValue: String, newValue: String): <Error class: unknown class>

An optimized way to replace all occurrences of oldValue with newValue in a StringBuilder.

Link copied to clipboard
fun String.sanitizeFileName(replacement: String): <Error class: unknown class>
Link copied to clipboard

Strips the anchor (fragment) from a URL string.

Link copied to clipboard
fun CharSequence.substringWithinBounds(startIndex: Int, endIndex: Int): String
Link copied to clipboard
fun CharSequence.takeLines(count: Int, addOmittedLinesSuffix: Boolean): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Discards blank entries and trims each remaining entry.