This is my attempt to understand how some standard i/o functions work in C. Basically, I've implemented my own very basic versions of printf
, scanf
and some other functions.
Basically all iolib functions work with File, instead of C's FILE (though File actually has FILE in it 😄). Many input and output functions use a fixed-size (BUFFER_SIZE, to be precise, which is set to 512 by default) buffer in order not to read from or write to a file each symbol individually.
In order to open/close a file use openFile
/closeFile
- simple as that 🐨.
Ever wanted to make some symbol other than this dull \0
be treated as string termination indicator? Well now you can! Just use setStringTermination
function and all iolib functions will consider e.g. Q
as string termination ( Quit - isn't it brilliant!?🦉)!
In iolib you can also find several useful functions like numberOfDigits
, strConcatenate
, strNumOfOccurrences
, isCyrillicLetter
and others.
You can also look at documentation for more details.