About 55 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. I did the

  2. 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 character by the function …

  3. 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 index at S1 at …

  4. 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 which doesn't …

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

    Aug 24, 2010 · implementation of strstr () function Asked 15 years, 5 months ago Modified 9 years, 1 month ago Viewed 41k times

  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) in the string …

  7. 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 check the …

  8. c - How to use strstr for string comparing - Stack Overflow

    You use strstr() when you want to find the exact 'needle' string at an arbitrary position in the 'haystack' string. You don't use it for Wordle-style searching; you have to write more specialized code for that.

  9. c++ - strstr () function and "\r\n" - Stack Overflow

    Apr 7, 2011 · The strstr() function stops at and returns the first character in str1 where the string str2 is found. So, if looking for str2 = "\r\n";, it will return a pointer to the first ' \r ' which is immediately …

  10. Criar função strstr / Retorno ponteiro em C - Stack Overflow em ...

    Oct 31, 2017 · Estou tentando refazer a função strstr (procura um valor passado por parâmetro num texto, se encontrar mostra o resto) por conta. Esse é meu código atual, ele já chegou a funcionar …