About 55 results
Open links in new tab
  1. 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 …

  2. 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

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

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

  8. Is it safe to use `strstr` to search for multibyte UTF-8 characters in ...

    So it is completely safe to use strstr with UTF-8 coded multibyte characters. When used with other encodings strstr is not suitable for strings containing multi-byte characters. If you are searching for a …

  9. 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.

  10. 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.