Hi, im wanting to no, what is needed to remove all characters like £ $ from a text file, to leave only normal letters remaining? Thanks.
This is a discussion on Keeping only A-Z . , in a text file within the C Programming forums, part of the General Programming Boards category; Hi, im wanting to no, what is needed to remove all characters like £ $ from a text file, to ...
Hi, im wanting to no, what is needed to remove all characters like £ $ from a text file, to leave only normal letters remaining? Thanks.
read file (for example usinf fgetc)
check char - using isupper, or isalpha or other suitable function
write char to the new file if it is ok
delete the old file and rename the new file
if file is not too big:
read file (for example usinf fgetc)
check char - using isupper, or isalpha or other suitable function
add it to the buffer if condition passed
when the whole file is processed - overwrite it with the buffer prepared
If I have eight hours for cutting wood, I spend six sharpening my axe.