Package-level declarations

Types

Link copied to clipboard
data class LengthValidator(val min: Int?, val max: Int?) : Validator<String>

A validator that forces a string to be of a certain length.

Link copied to clipboard
class RegexValidator(val pattern: Regex) : Validator<String>

A validator that uses regular expressions to validate strings.

Link copied to clipboard
class StringValidator(minLength: Int? = null, maxLength: Int? = null, rangeValidator: RangeValidator<String>? = null, lexicalValidator: Validator<String>? = null, syntaxValidator: Validator<String>? = null, semanticsValidator: Validator<String>? = null) : Validator<String>

Validates a String value object based on a given range and additional validators.

Properties

Link copied to clipboard
const val AMPERSAND: String
Link copied to clipboard
const val ASTERISK: String
Link copied to clipboard
const val AT_SIGN: String
Link copied to clipboard
const val BACK_SLASH: String
Link copied to clipboard
const val BACKTICK: String
Link copied to clipboard
const val CARET: String
Link copied to clipboard
const val COLON: String
Link copied to clipboard
const val COMMA: String
Link copied to clipboard
const val COMMA_SPACE: String
Link copied to clipboard
const val CR: String
Link copied to clipboard
const val CRLF: String
Link copied to clipboard
const val DOLLAR_SIGN: String
Link copied to clipboard
const val DOT: String
Link copied to clipboard
const val DOUBLE_QUOTE: String
Link copied to clipboard
const val EMPTY_STRING: String
Link copied to clipboard
const val EQ: String
Link copied to clipboard
const val EQUALS: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val GT: String
Link copied to clipboard
const val GT_EQ: String
Link copied to clipboard
const val HASH: String
Link copied to clipboard
const val HYPHEN: String
Link copied to clipboard
Link copied to clipboard
const val LEFT_PAREN: String
Link copied to clipboard
Link copied to clipboard
const val LT: String
Link copied to clipboard
const val LT_EQ: String
Link copied to clipboard
const val LT_GT: String
Link copied to clipboard
const val MINUS: String
Link copied to clipboard
const val NEW_LINE: String
Link copied to clipboard
const val PERCENT_SIGN: String
Link copied to clipboard
const val PIPE: String
Link copied to clipboard
const val PLUS: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val RIGHT_PAREN: String
Link copied to clipboard
Link copied to clipboard
const val SEMICOLON: String
Link copied to clipboard
const val SINGLE_QUOTE: String
Link copied to clipboard
const val SPACE: String
Link copied to clipboard
const val TAB: String
Link copied to clipboard
const val TILDE: String
Link copied to clipboard
const val UNDERSCORE: String
Link copied to clipboard
const val VERTICAL_BAR: String
Link copied to clipboard

Functions

Link copied to clipboard

Splits a string into a list of substrings using whitespace as the delimiter.

Link copied to clipboard
fun String.truncate(length: Int, affix: String = EMPTY_STRING, fromStart: Boolean = false): String

Truncates the string if its length exceeds the specified maximum length. An affix can be appended to the truncated string. By default, the truncation is performed from the end of the string with the affix appended as a suffix.