code: public static int getStringIdentifier(String name) {
          Resources res = Resources.getSystem();
          return res.getIdentifier(name, TYPE_STRING, NATIVE_PACKAGE);
      }
docs: Get a native string id by name as in 'R.string.name'.