view dwtx/dwtxhelper/StringReader.d @ 195:a4d38d47ddc4

HashMap support for null values and keys
author Frank Benoit <benoit@tionex.de>
date Tue, 03 Feb 2009 16:08:10 +0100
parents 1a5b8f8129df
children
line wrap: on
line source

module dwtx.dwtxhelper.StringReader;

import dwt.dwthelper.utils;

class StringReader : Reader {
    String str;
    this( String str ){
        implMissing(__FILE__,__LINE__);
        this.str = str;
    }
    public override int read(char[] cbuf, int off, int len){
        cbuf[ off .. off+len ] = str[ 0 .. len ];
        str = str[ len .. $ ];
        return len;
    }
    public override void  close(){
    }
}