OOP_IO-2x_2023-mirror/Java/lab_5/Punctuation.kt

11 lines
279 B
Kotlin
Raw Normal View History

2023-06-05 16:37:37 +03:00
package OOP.Java.lab_5
class Punctuation(var punctuationMark: String) {
private val punctuationMarkOptions: Regex = Regex("\\p{Punct}")
init {
if (!punctuationMarkOptions.containsMatchIn(punctuationMark)){
this.punctuationMark = ""
}
}
}