commit 6f8177a24c3c62eb4d23b6d84a67c788fad5f203
parent 58ce650562517fad96c1974e391b70a8a86c7fd8
Author: Dominik Schmidt <das1993@hotmail.com>
Date: Sun, 9 Aug 2015 14:53:42 +0200
readFortune -> read
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dfortune.d b/dfortune.d
@@ -100,7 +100,7 @@ class Fortune : RandomAccessFinite!(string){
return cast(string)str;
}
- public string readFortune(uint i){
+ public string read(uint i){
uint pos=getOffset(i);
uint end=getOffset(i+1)-3; //-3 to exclude \n%\n
return sliceFile(pos,end);
@@ -133,7 +133,7 @@ class Fortune : RandomAccessFinite!(string){
return c;
}
@property string back(){
- return readFortune(end);
+ return read(end);
}
string moveBack(){
return back;
@@ -153,7 +153,7 @@ class Fortune : RandomAccessFinite!(string){
return ret;
}
string moveFront(){
- return readFortune(pos);
+ return read(pos);
}
@property bool empty() const{
return (pos>end);
@@ -178,10 +178,10 @@ class Fortune : RandomAccessFinite!(string){
}
string moveAt(size_t i){
pos=cast(uint)i;
- return readFortune(pos);
+ return read(pos);
}
string opIndex(size_t i){
- return readFortune(cast(uint)i);
+ return read(cast(uint)i);
}
@property Fortune save(){