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:
@@ -180,6 +180,19 @@ public class MessageUtil
|
|||||||
return compose(key, targs);
|
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
|
* Returns a fully qualified message key which, when translated by
|
||||||
* some other bundle, will know to resolve and utilize the supplied
|
* some other bundle, will know to resolve and utilize the supplied
|
||||||
|
|||||||
Reference in New Issue
Block a user