nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/file: efficient write to file for FlatString
[nit.git]
/
lib
/
standard
/
file.nit
diff --git
a/lib/standard/file.nit
b/lib/standard/file.nit
index
1d6ea43
..
b5fd854
100644
(file)
--- a/
lib/standard/file.nit
+++ b/
lib/standard/file.nit
@@
-1078,6
+1078,13
@@
redef class String
end
end
+redef class FlatString
+ redef fun write_native_to(s)
+ do
+ s.write_native(items, index_from, length)
+ end
+end
+
redef class NativeString
private fun file_exists: Bool `{
FILE *hdl = fopen(self,"r");