About 3,890,000 results
Open links in new tab
  1. Strings in C (strstr function) - Stack Overflow

    Aug 19, 2021 · I'm trying to reproduce the behavior of the strstr() function, which tries to find a substring in a string and for that I created the following function and compared it to the original. …

  2. c - How to return value using strstr function? - Stack Overflow

    Mar 19, 2014 · The question is to input two strings: S1 and S2. The objective is to find whether there exist a substring, and I know strstr can be used. If there exists a substring, print the …

  3. c++ - How to find substring from string? - Stack Overflow

    A better approach is to test if /abc is a substring, and then see if the character after this substring (indexed using the pointer returned by strstr()) is either a / or a '\0':

  4. strstr() function like, that ignores upper or lower case

    Dec 5, 2014 · str2="two"; I would like to know if there is any function that checks for a match of the second string in the first one,and returns me a pointer to the first occurrence, something …

  5. c - strstr () function - Stack Overflow

    Jun 3, 2013 · This is because your string contains the newline character. From the fgets documentation: A newline character makes fgets stop reading, but it is considered a valid …

  6. c - Recreate the strstr () function - Stack Overflow

    Mar 6, 2018 · The functionality is described as: strstr() function locates the first occurrence in the string pointed to by s1 of the sequence of characters (excluding the terminating null character) …

  7. c - Get index of substring - Stack Overflow

    Sep 21, 2011 · With strstr I can get the poiner, but not the position, and without position I don't know the length of the substring. How can I get the index of the substring in pure C?

  8. c - strstr () function get the position - Stack Overflow

    Mar 18, 2015 · Also, the strstr () function takes arguments char *strstr (const char *haystack, const char *needle); That is, the first argument is the big string (the haystack) in which you are …

  9. c++ - Is there a reverse function for strstr - Stack Overflow

    Oct 28, 2009 · I am trying to find a similar function to strstr that searches a substring starting from the end towards the beginning of the string.

  10. c - implementation of strstr () function - Stack Overflow

    Aug 24, 2010 · implementation of strstr () function Asked 15 years, 3 months ago Modified 8 years, 10 months ago Viewed 41k times