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

monocle.refined.strings.scala Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
package monocle.refined

import eu.timepit.refined.api.Validate
import eu.timepit.refined.string.{EndsWith, StartsWith}
import monocle._

object strings extends StringsInstances

trait StringsInstances {
  def startsWith(
    prefix: String
  )(implicit v: Validate[String, StartsWith[prefix.type]]): Prism[String, StartsWithString[prefix.type]] =
    refinedPrism

  def endsWith(
    suffix: String
  )(implicit v: Validate[String, EndsWith[suffix.type]]): Prism[String, EndsWithString[suffix.type]] =
    refinedPrism
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy