code: private static String makeValid(String s) {
          StringBuilder result = new StringBuilder(s.length());
          for (int ch = 0, i = 0; i < s.length(); i += Character.charCount(ch)) {
              ch = s.codePointAt(i);
              if (Character.isJavaIdentifierPart(ch) || ch > ' ') {
                  result.appendCodePoint(ch);
              }
          }
          return result.toString();
      }
docs: /*
  Removes all code points that are not valid Java identifier parts from the given string if there is any.
  The string is returned unchanged otherwise.