Scala FAQ: How do I find API documentation (Scaladoc) for the Scala String
class?
Scala doesn’t have its own String
class, but you can use all of the methods of the Java String
class, and additional implicit methods that are added through the Scala StringOps class. From the Scaladoc of the Scala Predef object: “The String
type in Scala has methods that come either from the underlying Java String
, or are added implicitly through scala.collection.immutable.StringOps.”
When I look at the documentation for the Scala Predef
object — which is implicitly imported and available to all of your classes and objects — there are also conversion methods to go to and from a String
and a Scala WrappedString, but I haven’t looked into what methods might come from StringOps
and which ones might come from WrappedString
. (I’ll leave that as an exercise for the reader for now.)