diff options
author | Geoff Liu <cangming.liu@gmail.com> | 2014-11-10 19:58:14 -0700 |
---|---|---|
committer | Geoff Liu <cangming.liu@gmail.com> | 2014-11-10 19:58:14 -0700 |
commit | e784f52d33475b0cba059a0c07ad01b0e63578a9 (patch) | |
tree | 658c4a6dba2f1d9b449f2d4171528adb3b561fac /scala.html.markdown | |
parent | 45bc0f19a0e52d5ccc58db555cb3823c1a00e973 (diff) |
Minor consistency edit
Diffstat (limited to 'scala.html.markdown')
-rw-r--r-- | scala.html.markdown | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scala.html.markdown b/scala.html.markdown index 6311dba4..c8932c86 100644 --- a/scala.html.markdown +++ b/scala.html.markdown @@ -104,11 +104,12 @@ true == false // false // Strings have the usual Java methods defined on them "hello world".length -"ABCDEF".substring(2, 6) -"ABCDEF".replace("C", "3") +"hello world".substring(2, 6) +"hello world".replace("C", "3") // They also have some extra Scala methods. See also: scala.collection.immutable.StringOps "hello world".take(5) +"hello world".drop(5) // String interpolation: notice the prefix "s" val n = 45 |