"\n" is a 3 byte string; 10, 10, 0
The compiler sees '\n' as 10 and '\r' as 13. It saves keeping an ASCII Table around, in the back of most programming references there was (still might be) an ASCII table. ASCII text chars are a way to get more out of numbers, another representation.
You read what is sent and
char alpha = chr & 0b11011111; // makes alphas lower case
if (( chr >= 'A' ) && ( chr <= 'Z' )
{
// chr is an alphabet -- code for it
}
else if (( chr >= '0' ) && ( chr <= '9' )
{
// chr is a digit -- code for it
}
else if ( chr >= ' ' )
{
// chr is printable -- code for it
}
else
{
// chr is non-printable -- code for it
// maybe you print " 2 digit value "
// in a hex editor I'll see line by line 16 bytes as hex, tab, 16 bytes as printable text or a space. Have you written a hex editor ever? They make file hacking easier.
}
I got DFPlayer minis to handle music but can't get at meta-data like titles from the on-module micro-SD let alone files I would keep on there. Oh well, saves on a display.