Expand All Collapse All


Display
Anonymize
How do I read from StdIn with newlines (rather than any whitespace) as separators?
The StdIn documentation lists all of the methods available in the library. In particular, StdIn.readLine() reads every character until the next line.
How can I recover the individual values in a line of a CSV file?
The s.split(t) method returns an array containing all strings divided by the substring t. For example, "a: b:cd:e".split(":") returns the String array ["a", " b", "cd", "e"].
(You don't need to know what a regular expression is for the purposes of this assignment. But if you're curious, they arise in the theory of formal languages and are quite useful in practice -- if you've ever gotten a warning due to a mistyped email, you've seen them in the wild!)
Transpose
Fugue