Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have two variables:
and I comparing
if(strcmp(dataRx, globalAuthcode) == 0)
I can't find function like SUBSTR from PHP :) I want leve only 1234 from dataRx variable.
Use pointer arithmetics:
strcmp(dataRx + 7, globalAuthcode) /* ^^^^ */
The dataRx + 7 skips over the first seven characters of the string. Of course, you might want to make sure that the string is at least 7 characters before doing that.
dataRx + 7