join() Data String Functions Web & Application // works identically with float[] and String[] int list[] = new list[3]; list[0] = 8; list[1] = 67; list[2] = 5; String formatted = join(list, ", "); // formatted now contains "8, 67, 5" // to format the number of digits used // the '3' means to pad with zeroes up to 3 digits String withzeroes = join(list, " ", 3); // withzeros now contains "008 067 005" // for floats, formatting is more complicated because // there are also digits after the decimal point. float f[] = new float[3]; f[0] = 1.3; f[1] = 92.8; f[2] = 0.7; // 3 digits on the left of the decimal point // 2 digits to the right of the decimal point String zerofloats = join(f, " ", 3, 2); // zerofloats now contains "001.30 092.80 007.70" // or if you don't want to pad the left-hand side // a zero will say to ignore and don't pad String lesspadding = join(f, " ", 0, 2); // lesspadding now contains "1.30 92.80 7.70" Combines an array of elements into one String. join(anyArray, separator) join(intArray, separator, digits) join(floatArray, separator, left, right) array of strings, ints, or floats array of ints array of floats String: a string to be placed between each item int: number of digits to pad with zeroes int: number of digits to the left of the decimal point int: number of digits to the right of the decimal point String split() 1.0 Function Core Extended