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

com.github.mdr.ascii.layout.drawing.BoxDrawingCharacters.scala Maven / Gradle / Ivy

package com.github.mdr.ascii.layout.drawing

object BoxDrawingCharacters {

  def isBoxDrawingCharacter(c: Char): Boolean = c >= 0x2500 && c <= 0x257f

  def connectSingleRight(c: Char) = c match {
    case '│' ⇒ '├'
    case '─' ⇒ '─'

    case '║' ⇒ '╟'
    //    case '═' ⇒ '═'

    case '╢' ⇒ '╫'
    case '╟' ⇒ '╟'
    //    case '╤' ⇒ '╤'
    //    case '╧' ⇒ '╧'

    case '╫' ⇒ '╫'
    //    case '╪' ⇒ '╪'

    //    case '╡' ⇒ '╡'
    case '╨' ⇒ '╨'
    //    case '╞' ⇒ '╞'
    case '╥' ⇒ '╥'

    case '┼' ⇒ '┼'

    case '┐' ⇒ '┬'
    case '┘' ⇒ '┴'
    case '└' ⇒ '└'
    case '┌' ⇒ '┌'

    case '┬' ⇒ '┬'
    case '┴' ⇒ '┴'
    case '┤' ⇒ '┼'
    case '├' ⇒ '├'
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy