Added decompose to break a composed compound message back into individual

strings and restore any previously escaped instances of the separator
character.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1582 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2005-01-28 04:18:09 +00:00
parent f07c9f1ac3
commit fbe4de5323
@@ -180,6 +180,19 @@ public class MessageUtil
return compose(key, targs);
}
/**
* Decomposes a compound key into its constituent parts. Arguments
* that were tainted during composition will remain tainted.
*/
public static String[] decompose (String compoundKey)
{
String[] args = StringUtil.split(compoundKey, "|");
for (int ii = 0; ii < args.length; ii++) {
args[ii] = unescape(args[ii]);
}
return args;
}
/**
* Returns a fully qualified message key which, when translated by
* some other bundle, will know to resolve and utilize the supplied