Changeset 676 for trunk/ab5.0/ablib/src/Classes/System/IO/TextReader.ab
- Timestamp:
- Jan 13, 2009, 2:01:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/IO/TextReader.ab
r668 r676 22 22 Virtual Function Peek() As Long 23 23 If pos >= buf.Length Then 24 buf.Length = 0 25 pos = 0 24 26 If Not Underflow() Then 25 27 Peek = -1 … … 114 116 Wend 115 117 ReadToEnd = buf.ToString() 118 buf.Length = 0 119 pos = 0 116 120 End Function 117 121 … … 141 145 @auther Egtra 142 146 @return 内部バッファ 147 内部バッファの既存の要素は、一切の変更をしないこと。また、空であるという仮定を置かないこと。 143 148 */ 144 149 Function Buffer() As Text.StringBuilder … … 151 156 */ 152 157 Function ReadImpl(buffer As *Char, count As Long) As Long 158 'ToDo 適当なところでバッファの読み取り済みの部分を除去する処理を入れる(現在Peekのみ)。 153 159 Dim p = StrPtr(buf) 154 160 While buf.Length - pos < count … … 156 162 Wend 157 163 ReadImpl = Math.Min(buf.Length - pos, count) 158 ActiveBasic.Strings.ChrCopy(buffer, VarPtr(p[pos]) , ReadImpl As SIZE_T)164 ActiveBasic.Strings.ChrCopy(buffer, VarPtr(p[pos]) As *Char, ReadImpl As SIZE_T) 159 165 pos += ReadImpl 160 166 End Function
Note:
See TracChangeset
for help on using the changeset viewer.