public static String cppGenerateArrayTypedEntity(String entity, String translatedarraytype) {
    { boolean referencetypeP = Native.stringSearch(translatedarraytype, "(*&)", 0) != Stella.NULL_INTEGER;

      if (referencetypeP) {
        return (Stella.replaceSubstrings(translatedarraytype, "(*&" + entity + ")", "(*&)"));
      }
      else {
        return (Stella.replaceSubstrings(translatedarraytype, "(*" + entity + ")", "(*)"));
      }
    }
  }