https://github.com/robertograham/encodeuricomponent
Java implementation of ECMAScript 2015 encodeUriComponent
https://github.com/robertograham/encodeuricomponent
ecmascript2015 encode encodeuricomponent java javascript uri
Last synced: about 2 months ago
JSON representation
Java implementation of ECMAScript 2015 encodeUriComponent
- Host: GitHub
- URL: https://github.com/robertograham/encodeuricomponent
- Owner: RobertoGraham
- License: mit
- Created: 2018-04-18T11:32:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-19T21:05:30.000Z (about 8 years ago)
- Last Synced: 2024-11-17T13:05:15.020Z (over 1 year ago)
- Topics: ecmascript2015, encode, encodeuricomponent, java, javascript, uri
- Language: Java
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://maven-badges.herokuapp.com/maven-central/io.github.robertograham/encodeuricomponent)
# encodeuricomponent
Java implementation of ECMAScript 2015 encodeUriComponent
## Install
```xml
io.github.robertograham
encodeuricomponent
1.0.0
```
## Usage
The following will print `%23this%20is%20a%20test`
```java
import io.github.robertograham.encodeuricomponent.encoder.Encoder;
import java.net.URISyntaxException;
public class Example {
public static void main(String[] args) throws URISyntaxException {
System.out.println(Encoder.encodeUriComponent("#this is a test"));
}
}
```
## Tests
The project is covered by 20 JUnit 5 DynamicTests. Pull requests for additional DynamicTests are welcome!