- /**\r
- * prints a formatted number following printf conventions\r
- * @param s a PrintStream\r
- * @param fmt the format string\r
- * @param x the double to print\r
- */\r
- public static void print(java.io.PrintStream s, String fmt, double x)\r
+ return r + g + b;\r
+ }\r
+\r
+ /**\r
+ * prints a formatted number following printf conventions\r
+ * @param s a PrintStream\r
+ * @param fmt the format string\r
+ * @param x the double to print\r
+ */\r
+ public static void print(java.io.PrintStream s, String fmt, double x)\r
+ {\r
+ s.print(new Format(fmt).form(x));\r
+ }\r
+\r
+ /**\r
+ * prints a formatted number following printf conventions\r
+ * @param s a PrintStream\r
+ * @param fmt the format string\r
+ * @param x the long to print\r
+ */\r
+ public static void print(java.io.PrintStream s, String fmt, long x)\r
+ {\r
+ s.print(new Format(fmt).form(x));\r
+ }\r
+\r
+ /**\r
+ * prints a formatted number following printf conventions\r
+ * @param s a PrintStream\r
+ * @param fmt the format string\r
+ * @param x the character to\r
+ */\r
+ public static void print(java.io.PrintStream s, String fmt, char x)\r
+ {\r
+ s.print(new Format(fmt).form(x));\r
+ }\r
+\r
+ /**\r
+ * prints a formatted number following printf conventions\r
+ * @param s a PrintStream, fmt the format string\r
+ * @param x a string that represents the digits to print\r
+ */\r
+ public static void print(java.io.PrintStream s, String fmt, String x)\r
+ {\r
+ s.print(new Format(fmt).form(x));\r
+ }\r
+\r
+ /**\r
+ * Converts a string of digits (decimal, octal or hex) to an integer\r
+ * @param s a string\r
+ * @return the numeric value of the prefix of s representing a base 10 integer\r
+ */\r
+ public static int atoi(String s)\r
+ {\r
+ return (int) atol(s);\r
+ }\r
+\r
+ /**\r
+ * Converts a string of digits (decimal, octal or hex) to a long integer\r
+ * @param s a string\r
+ * @return the numeric value of the prefix of s representing a base 10 integer\r
+ */\r
+ public static long atol(String s)\r
+ {\r
+ int i = 0;\r
+\r
+ while ( (i < s.length()) && Character.isWhitespace(s.charAt(i)))\r