nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b1a631
)
lib/standard/ropes: Added prepend service, alias to insert_at(0).
author
Lucas Bajolet
<r4pass@hotmail.com>
Thu, 5 Jun 2014 14:32:03 +0000
(10:32 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Thu, 5 Jun 2014 18:17:07 +0000
(14:17 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/standard/ropes.nit
patch
|
blob
|
history
diff --git
a/lib/standard/ropes.nit
b/lib/standard/ropes.nit
index
f4221b0
..
c8409a2
100644
(file)
--- a/
lib/standard/ropes.nit
+++ b/
lib/standard/ropes.nit
@@
-210,6
+210,9
@@
class RopeString
return new RopeString.from_root(last_concat)
end
+ # Adds `s` at the beginning of self
+ fun prepend(s: String): String do return insert_at(s, 0)
+
# Adds `s` at the end of self
fun append(s: String): String
do