A collection of 100+ Scala String examples
By Alvin Alexander. Last updated: July 16 2019
This page contains a collection of over 100 Scala String examples, including strings functions, format specifiers, and more. I don’t provide too many details about how things work in these examples; this is mostly just a collection of examples that can be used as a reference page or cheat sheet. (I do show the output of most examples.)
First, here are some basic uses of the Scala String class to help get us warmed up: