It would be useful to have InterledgerAddress be able to provide the prefix for an address that is not itself already a prefix. Something like the following:
final InterledgerAddress getPrefix(){
if (this.isLedgerPrefix()) {
return this.getValue();
} else {
return InterledgerAddress.of(getValue().substring(0, this.getValue().lastIndexOf(".")));
}
}
It would be useful to have
InterledgerAddress
be able to provide the prefix for an address that is not itself already a prefix. Something like the following: