All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.curs.adocwrapper.utils.TitleString.kt Maven / Gradle / Ivy

The newest version!
package ru.curs.adocwrapper.utils

import ru.curs.adocwrapper.inline.UnsafeInline

class TitleString(string: String) : UnsafeInline(string) {
    override fun toString(): String {
        return text!!
    }

    override fun checkValid() {
        val pattern = "[^\n]+"
        if (! (Regex(pattern) matches text!!)) {
            throw Exception("String [$text] should match [$pattern]")
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy