Skip to content

Commit

Permalink
Rename withoutVarying to trimEndIfVarying and improve visibility scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-apuliasoft committed Sep 11, 2024
1 parent 5d57c47 commit f814ee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class ExpressionEvaluation(
}
}
left is StringValue && right is BooleanValue -> {
val s = left.withoutVarying() + right.asString().value
val s = left.trimEndIfVarying() + right.asString().value
s.asValue()
}
else -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ data class StringValue(var value: String, var varying: Boolean = false) : Abstra
else -> super.compareTo(other)
}

fun withoutVarying() = if (varying) value.trimEnd() else value
internal fun trimEndIfVarying() = if (varying) value.trimEnd() else value

override fun getWrappedString() = value
}
Expand Down

0 comments on commit f814ee8

Please sign in to comment.