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

com.hypertino.inflector.naming.DashCaseBuilder.scala Maven / Gradle / Ivy

package com.hypertino.inflector.naming

class DashCaseBuilder(possibleLength: Option[Int] = None) extends IdentifierBuilder {
  private val sb = possibleLength.map {
    new StringBuilder(_)
  } getOrElse {
    new StringBuilder
  }

  override def divider(): Unit = {
    sb.append('-')
  }

  override def regular(c: Char): Unit = {
    sb.append(c.toLower)
  }

  override def toString() = {
    sb.toString()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy