We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
"Keil C51 is very good" strncpy can Get sub str from Left. I want to get "very good". Is there a function "strrncpy" to uses ?
If you want the n rightmost bytes of a string, it's easy to code yourself on top of the existing ANSI C string functions.
char* strrncpy (char* dst, const char* src, int n) { return strncpy (dst, src + strlen(src) - n, n); } // strrncpy