Lab 5, technically working prototype. It's horrid, though.
This commit is contained in:
parent
49dfcfe457
commit
d91c576ab3
|
@ -3,8 +3,8 @@ package OOP.Java.lab_5
|
||||||
class Text(textString: String) {
|
class Text(textString: String) {
|
||||||
var textArray = arrayOf<Pair<Sentence, Punctuation>>()
|
var textArray = arrayOf<Pair<Sentence, Punctuation>>()
|
||||||
var rawText: String = ""
|
var rawText: String = ""
|
||||||
val arrayOfSentences = splitSentences(textString)
|
// val arrayOfSentences = splitSentences(textString)
|
||||||
val arrayOfPunctuations: Array<Punctuation> = splitPunctuation(textString)
|
// val arrayOfPunctuations: Array<Punctuation> = splitPunctuation(textString)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val arrayOfSentences = splitSentences(textString)
|
val arrayOfSentences = splitSentences(textString)
|
||||||
|
@ -46,9 +46,6 @@ class Text(textString: String) {
|
||||||
return results.maxBy { it.length }
|
return results.maxBy { it.length }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun checkStringInBoundaries(stringToCheck: String): Boolean {
|
|
||||||
return stringToCheck.equals(stringToCheck.reversed(), true)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
var text = arrayOf<String>()
|
var text = arrayOf<String>()
|
||||||
|
|
Loading…
Reference in New Issue