comparison dwtx/jface/internal/text/html/SingleCharReader.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents 25f1f92fa3df
children
comparison
equal deleted inserted replaced
161:f8d52b926852 162:1a5b8f8129df
45 if (ch is -1) { 45 if (ch is -1) {
46 if (i is off) 46 if (i is off)
47 return -1; 47 return -1;
48 return i - off; 48 return i - off;
49 } 49 }
50 cbuf[i]= cast(wchar)ch; 50 cbuf[i]= cast(char)ch;
51 } 51 }
52 return len; 52 return len;
53 } 53 }
54 54
55 /** 55 /**
66 */ 66 */
67 public String getString() { 67 public String getString() {
68 StringBuffer buf= new StringBuffer(); 68 StringBuffer buf= new StringBuffer();
69 int ch; 69 int ch;
70 while ((ch= read()) !is -1) { 70 while ((ch= read()) !is -1) {
71 buf.append(cast(wchar)ch); 71 buf.append(cast(char)ch);
72 } 72 }
73 return buf.toString(); 73 return buf.toString();
74 } 74 }
75 } 75 }