Specifically, I have a working report that looks like this:
"( <b>" + result + "</b> ) " + PlayerName + " rolled " + nDice + (nDice == 1 ? " die" : " dice") + ". Result: " + ((result.contains("1")) ? "<b>SUCCESS" : (result.contains("2")) ? "<b>SUCCESS" : (result.contains("3")) ? "<b><span style=color:#DB0000;>FAILURE" : (result.contains("4")) ? "<b><span style=color:#DB0000;>FAILURE" : "<b><span style=color:#DB0000;>CATASTROPHIC FAILURE")
The question is how can I combine something like ((result.contains("1")) ? "<b>SUCCESS" : (result.contains("2")) ? "<b>SUCCESS" :
in a cleaner way, with one less ? : condition.