Stripping <items in here> from a text file
Stripping <items in here> from a text file
what i wan to do is get rid of items in <items in here>
for example, for the string "dsafgsgwrgh<itema>grsgwrhhwr<itemb>fsdf"
i want to get rid of "itema" and "itemb"
here is my code
- open file
- copy file to a CString
- look for <
- look for >
Code:
CString file_string;
CString file_string_temp;
int start_index;
int end_index;
f.Read(file_string.GetBuffer(f.GetLength()),f.GetLength());
start_index = file_string.Find("<");
end_index = file_string.Find(">");
file_string_temp = file_string.Left(start_index);
int aaa = file_string.GetLength();
int b=5;
but unfortunately it doesnt work
is the file too big? the file is about 2,000,000,000 in f.GetLength
file_string.Left(start_index); copies the entire file_string instead of only copying left strings
can somebody tell me what's wrong?