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

mdoc.internal.markdown.Gensym.scala Maven / Gradle / Ivy

The newest version!
package mdoc.internal.markdown

class Gensym() {
  private var counter = 0
  def reset(): Unit = {
    counter = 0
  }
  def fresh(prefix: String, suffix: String = ""): String = {
    val name = s"$prefix$counter$suffix"
    counter += 1
    name
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy