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.
Functionality
struct File
Basically all iolib functions work with File, instead of C's FILE (though File actually has FILE in it
In order to open/close a file use openFile
/closeFile
- simple as that
String termination
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!?
🪄
Some other elvish magic In iolib you can also find several useful functions like numberOfDigits
, strConcatenate
, strNumOfOccurrences
, isCyrillicLetter
and others.
Documentation
You can also look at documentation for more details.