public static String cppSubstituteForbiddenCharacters(String name, Keyword caseconvention) {
    { StringBuffer result = null;
      char substitution = Stella.NULL_CHARACTER;

      switch (name.charAt(0)) {
        case '0': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "zero")));
        break;
        case '1': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "one")));
        break;
        case '2': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "two")));
        break;
        case '3': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "three")));
        break;
        case '4': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "four")));
        break;
        case '5': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "five")));
        break;
        case '6': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "six")));
        break;
        case '7': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "seven")));
        break;
        case '8': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "eight")));
        break;
        case '9': 
          result = new StringBuffer((Stella.replaceFirstCharacterWithString(name, "nine")));
        break;
        default:
          result = new StringBuffer(name);
        break;
      }
      { int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = result.length() - 1;

        for (;iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          substitution = Stella.$CPP_CHARACTER_SUBSTITUTION_TABLE$.charAt(((int) (result.charAt(i))));
          if (!(substitution == '=')) {
            if (caseconvention == Stella.KWD_UPPERCASE) {
              edu.isi.stella.javalib.Native.mutableString_nthSetter(result, (Stella.$CHARACTER_DOWNCASE_TABLE$.charAt(((int) substitution))), i);
            }
            else if (caseconvention == Stella.KWD_LOWERCASE) {
              edu.isi.stella.javalib.Native.mutableString_nthSetter(result, (Stella.$CHARACTER_UPCASE_TABLE$.charAt(((int) substitution))), i);
            }
            else if (caseconvention == Stella.KWD_CAPITALIZED) {
              edu.isi.stella.javalib.Native.mutableString_nthSetter(result, (Stella.$CHARACTER_UPCASE_TABLE$.charAt(((int) substitution))), i);
            }
            else {
              { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                stream000.nativeStream.print("`" + caseconvention + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
              }
            }
          }
        }
      }
      return (result.toString());
    }
  }