addOn.AppendWithConversion(achars[romanPos]); addOn.AppendWithConversion(achars[romanPos+1]);
addOn.Append(PRUnichar(achars[romanPos])); addOn.Append(PRUnichar(achars[romanPos+1]));
static void RomanToText(PRInt32 ordinal, nsString& result, const char* achars, const char* bchars){  if (ordinal <= 0) {    ordinal = 1;  }  nsAutoString addOn, decStr;  decStr.AppendInt(ordinal, 10);  PRIntn len = decStr.Length();  const PRUnichar* dp = decStr.get();  const PRUnichar* end = dp + len;  PRIntn romanPos = len;  PRIntn n;  for (; dp < end; dp++) {    romanPos--;    addOn.SetLength(0);    switch(*dp) {      case '3':  addOn.AppendWithConversion(achars[romanPos]);      case '2':  addOn.AppendWithConversion(achars[romanPos]);      case '1':  addOn.AppendWithConversion(achars[romanPos]);        break;      case '4':        addOn.AppendWithConversion(achars[romanPos]);        // FALLTHROUGH      case '5': case '6':      case '7': case  '8':        addOn.AppendWithConversion(bchars[romanPos]);        for(n=0;n<(*dp-'5');n++) {          addOn.AppendWithConversion(achars[romanPos]);        }        break;      case '9':        addOn.AppendWithConversion(achars[romanPos]);        addOn.AppendWithConversion(achars[romanPos+1]);        break;      default:        break;    }    result.Append(addOn);  }}