docs: public static String format(String format, Object[] args)
  	{
  		StringBuilder answer = new StringBuilder(format.length() + (args.length * 20));
  		String[] argStrings = new String[args.length];
  		for (int i = 0; i < args.length; ++i)
  		{
  			if (args[i] == null)
  				argStrings[i] = "<null>"; //$NON-NLS-1$
  			else
  				argStrings[i] = args[i].toString();
  		}
  		int lastI = 0;
  		for (int i = format.indexOf('{', 0); i >= 0; i = format.indexOf('{', lastI))
  		{
  			if (i != 0 && format.charAt(i - 1) == '\\')
  			{
  				// It's escaped, just print and loop.
  				if (i != 1)
  					answer.append(format.substring(lastI, i - 1));
  				answer.append('{');
  				lastI = i + 1;
  			}
  			else
  			{
  				// It's a format character.
  				if (i > format.length() - 3)
  				{
  					// Bad format, just print and loop.
  					answer.append(format.substring(lastI, format.length()));
  					lastI = format.length();
  				}
  				else
  				{
  					int argnum = (byte) Character.digit(format.charAt(i + 1), 10);
  					if (argnum < 0 || format.charAt(i + 2) != '}')
  					{
  						// Bad format, just print and loop.
  						answer.append(format.substring(lastI, i + 1));
  						lastI = i + 1;
  					}
  					else
  					{
  						// Got a good one!
  						answer.append(format.substring(lastI, i));
  						if (argnum >= argStrings.length)
  							answer.append("<missing argument>"); //$NON-NLS-1$
  						else
  							answer.append(argStrings[argnum]);
  						lastI = i + 3;
  					}
  				}
  			}
  		}
  		if (lastI < format.length())
  			answer.append(format.substring(lastI, format.length()));
  		return answer.toString();
  	}