nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/bucketed_game: revamp constructor of `Buckets`
[nit.git]
/
tests
/
example_procedural_string.nit
diff --git
a/tests/example_procedural_string.nit
b/tests/example_procedural_string.nit
index
a78d01f
..
e8d5c50
100644
(file)
--- a/
tests/example_procedural_string.nit
+++ b/
tests/example_procedural_string.nit
@@
-14,11
+14,15
@@
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
+#alt1 import standard
+#alt1 import standard::ropes
+
# A procedural program (without explicit class).
fun first_word(s: String): String
do
# A procedural program (without explicit class).
fun first_word(s: String): String
do
- var result = new Buffer
+ var result: Buffer = new FlatBuffer
+ #alt1 result = new RopeBuffer
var i = 0
while i < s.length and s.chars[i] != ' ' do
result.add(s.chars[i])
var i = 0
while i < s.length and s.chars[i] != ' ' do
result.add(s.chars[i])