About 3,550,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

    printf("%d\n",exists); return 0; } but exists will be 1 even if abc is not followed by a null-terminator. This is because the string literal "/abc\0" is equivalent to "/abc". A better approach is to test if …

  4. 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) …

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

    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 like strstr(), but …

  6. 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 …

  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 · I checked the result of strstr() before printing values based on NULL. I also added another #define to distinguish the size of the stack from the length of the test string, and, I …

  9. отсутствуют экземпляры перегруженная функция strstr

    Feb 5, 2023 · E0304 отсутствуют экземпляры перегруженная функция "strstr", соответствующие списку аргументов E0167 аргумент типа "const char *" несовместим с …

  10. Does strstr() return a pointer to malloced memory, requiring me to ...

    Sep 8, 2020 · The strstr function does not return alloc'ed memory. It returns a pointer to the start of the substring inside of the haystack parameter. So in this case strstr will return str + 12.