nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/standard/ropes: Added prepend service, alias to insert_at(0).
[nit.git]
/
lib
/
standard
/
ropes.nit
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