< and > as characters in C?
#4
Yeah, I just wrote this little test and it works OK.
Code:
/*
  Show the bug
*/

#include <string.h>
#include <stdio.h>

char testdata[] = "foo xyzzy <tag> nonsense <label> junk more junk";

int main(void) {
  if (strstr(testdata,"<tag>") == NULL)
    printf("tag not found\n");
  else
    printf("tag found\n");
  if (strstr(testdata,"<label>") == NULL)
    printf("label not found\n");
  else
    printf("label found\n");
  return 0;
}
The real thing has 5 MB of data, too much to post.
  Reply


Messages In This Thread
< and > as characters in C? - by ab1jx - 01-18-2021, 06:16 PM
RE: < and > as characters in C? - by ab1jx - 01-18-2021, 07:38 PM
RE: < and > as characters in C? - by barray - 01-18-2021, 08:59 PM
RE: < and > as characters in C? - by ab1jx - 01-19-2021, 06:47 AM
RE: < and > as characters in C? - by barray - 01-20-2021, 04:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Keyboard types random characters erock22 10 10,944 10-30-2020, 08:53 PM
Last Post: erock22
  Darktable - characters are square PaulQ 7 9,998 09-13-2020, 10:38 PM
Last Post: kenigan

Forum Jump:


Users browsing this thread: 2 Guest(s)