Take a file name from the full path

xiaoxiao2021-03-06  36

From the end, I found '//', and I took out the '//'. INT POS; Char Strname [64]; int Len = strlen (filename); for (POS = LEN-1; POS> = 0 & FileName [POS]! = '//'; POS -);

POS ; strcpy (Strname, (char *) FileName POS);

Function name: strstr function: Find the first occurrence of specified strings in the string: char * str1, char * str2; example: #include #include INT main (void) {char * str1 = "borland International", * str2 = "nation", * ptr; PTR = strs (str1, str2); Printf ("The Substring IS:% S / N", PTR); Return 0;}

转载请注明原文地址:https://www.9cbs.com/read-63978.html

New Post(0)