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

io.fintrospect.util.PathSegmentEncoderDecoder.scala Maven / Gradle / Ivy

package io.fintrospect.util

import java.net.URI

object PathSegmentEncoderDecoder {
  def encode(in: String): String = {
    in.split("/").map(new URI("http", "localhost", _).getRawFragment).mkString("%2F")
  }

  def decode(in: String): String = new URI("http://localhost/" + in).getPath.substring(1)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy