Convert lowercase alphabet letters before passing them to the next implementation. Already uppercase letters and other characters pass through unchanged.The character conversion uses the paper's contiguous lowercase and uppercase Latin ranges. ThusDeletion, reading, and size need no overrides.
trait CapitalisePlugIn extends Doc {
abstract override def insert(x: Char, pos: Int): Unit = {
val y = if ('a' <= x && x <= 'z') ('A' + (x - 'a')).toChar else x
super.insert(y, pos)
}
} Articles by others on the same topic
There are currently no matching articles.