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

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

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

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

  7. 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 /abc is a …

  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. strstr () for a string that is NOT null-terminated - Stack Overflow

    Dec 21, 2011 · How do I do the in-place equivalent of strstr() for a counted string (i.e. not null-terminated) in C?

  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.