(stream, c)
| 807 | |
| 808 | // return a part of prefix of current stream from current position |
| 809 | function prefix(stream, c){ |
| 810 | if(c){ |
| 811 | var x=stream.pos-c; |
| 812 | return stream.string.substr((x>=0?x:0),c);} |
| 813 | else{ |
| 814 | return stream.string.substr(0,stream.pos-1); |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | // return a part of suffix of current stream from current position |
| 819 | function suffix(stream, c){ |