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

java.net.URLEncoder.scala Maven / Gradle / Ivy

There is a newer version: 2.2.6.3
Show newest version
package java.net

import java.io.UnsupportedEncodingException

import scala.scalajs.js

object URLEncoder {

  def encode(s: String, enc: String): String = {
    if (enc.toUpperCase != "UTF-8")
      throw new UnsupportedEncodingException(enc)
    else
      js.Dynamic.global.encodeURI(s).asInstanceOf[String]
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy