Arduino Forum

Using Arduino => Audio => Topic started by: suraj_150890 on Aug 11, 2016, 10:50 am

Title: strcmp of .WAV file
Post by: suraj_150890 on Aug 11, 2016, 10:50 am
Hii all,

I was referring one of the code and bit curious to understand. If suppose I have a wav file say(XYZ.wav)
As per my understanding mylen will have mylen =7-4; Want to know strcmp function?

So strcmp will be strcmp(XYZ.wav + 3,".wav") -> so how it would compare (.wav with .wav). Please find the code snippet below.

Code: [Select]

int mylen=strlen(entry.name())-4;// compare last 4 characters
     if ((strcmp(entry.name() + mylen,".WAV")==0) || (strcmp(entry.name() + mylen,".wav")==0)) {