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

pl.morgaroth.utils.strings.escapingRegex.scala Maven / Gradle / Ivy

package pl.morgaroth.utils.strings

object escapingRegex {

  class RichString(str: String) {
    def escapeMe =
      str.replaceAll("\\-", """\\-""").
        replaceAll("\\?", """\\?""").
        replaceAll("\\[", """\[""").
        replaceAll("\\]", """\]""").
        replaceAll("\\.", """\.""")
  }

  import scala.language.implicitConversions

  implicit def wrapToRich(str: String) = new RichString(str)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy