com.github.bjansen:sepa-conversion-tool

A Java library that implements the SEPA conversion table provided by the EPC

License

License

GroupId

GroupId

com.github.bjansen
ArtifactId

ArtifactId

sepa-conversion-tool
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

A Java library that implements the SEPA conversion table provided by the EPC
Source Code Management

Source Code Management

http://github.com/bjansen/sepa-conversion-tool/tree/master/sepa-conversion-tool

Download sepa-conversion-tool

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.bjansen/sepa-conversion-tool/ -->
<dependency>
    <groupId>com.github.bjansen</groupId>
    <artifactId>sepa-conversion-tool</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.bjansen/sepa-conversion-tool/
implementation 'com.github.bjansen:sepa-conversion-tool:0.2.0'
// https://jarcasting.com/artifacts/com.github.bjansen/sepa-conversion-tool/
implementation ("com.github.bjansen:sepa-conversion-tool:0.2.0")
'com.github.bjansen:sepa-conversion-tool:jar:0.2.0'
<dependency org="com.github.bjansen" name="sepa-conversion-tool" rev="0.2.0">
  <artifact name="sepa-conversion-tool" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.bjansen', module='sepa-conversion-tool', version='0.2.0')
)
libraryDependencies += "com.github.bjansen" % "sepa-conversion-tool" % "0.2.0"
[com.github.bjansen/sepa-conversion-tool "0.2.0"]

Dependencies

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.5.2
org.junit.jupiter : junit-jupiter-engine jar 5.5.2

Project Modules

There are no modules declared in this project.

sepa-conversion-tool

A Java library that implements the SEPA conversion table provided by the EPC

Example

@Test
void convertSample() {
	SepaCharacterConverter converter = SepaCharacterConverter.basicLatin();

	// characters that don't need conversion are preserved
	assertEquals("hello", converter.convertToSepaCharacters("hello"));

	// characters that need conversion are replaced
	assertEquals("Hello", converter.convertToSepaCharacters("Ħĕŀŀœ"));

	// characters that are outside of the range of the convertion table are dropped
	assertEquals("outside of range", converter.convertToSepaCharacters("outsi�de o�f r≧an∰g℗e"));
}

Usage

The library can be imported to Maven projects like this:

<dependency>
	<groupId>com.github.bjansen</groupId>
	<artifactId>sepa-conversion-tool</artifactId>
	<version>0.2.0</version>
</dependency>

The next step is to choose your converter, and use it:

SepaCharacterConverter converter = SepaCharacterConverter.basicLatin(); 
// or SepaCharacterConverter.longTermSepa()

String converted = converter.convertToSepaCharacters("Ħĕŀŀœ"); // will be converted to "Hello"

Versions

Version
0.2.0
0.1.2
0.1.1
0.1.0