Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / example_string.nit
index f066eac..8824617 100644 (file)
@@ -27,7 +27,7 @@ printn("The value of a is: ", a, ".\n")
 # Second way: Build a string and display it.
 # Pro: Eiffel way (rigourous).
 # Con: Eiffel way (heavy).
-var s = new FlatBuffer.from("The value of a is: ")
+var s: Buffer = new FlatBuffer.from("The value of a is: ")
 s.append(a.to_s)
 s.append(".\n")
 printn(s)
@@ -45,4 +45,4 @@ printn("The value of a is: " + a.to_s + ".\n")
 # Fiveth way: Join arrays.
 # Pro: Sometime efficient on complex concatenation.
 # Con: Crazy.
-printn(["The value of a is: ", a.to_s, ".\n"].join(""))
+printn(["The value of a is: ", a.to_s, ".\n"].join)