code: static String convertToSnakeCase(final String string) {
          final StringBuilder builder = new StringBuilder();
          boolean isPrevCharLowerCase = false;
          for (int index = 0; index < string.length(); index++) {
              final char character = string.charAt(index);
              if (character == ' ') {
                  builder.append("_");
              } else if (Character.isUpperCase(character) && isPrevCharLowerCase) {
                  builder.append("_").append(Character.toLowerCase(character));
              } else {
                  builder.append(Character.toLowerCase(character));
              }
              isPrevCharLowerCase = Character.isLowerCase(character);
          }
          return builder.toString();
      }
docs: /* package private