linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* substring offset
@ 2002-08-31 18:11 Ken Martwick
  2002-08-31 21:21 ` Ibraheem Umaru-Mohammed
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Martwick @ 2002-08-31 18:11 UTC (permalink / raw)
  To: linux-c-programming

In this code snippet,
 
          findptr = strstr(realine[n], search);
          if(findptr)
               {
               diff = (int)(findptr - realine[n]);
 
why isn't "diff" the offset of "search" in "realine[n]"?  How
can I calculate the offset?
Ken Martwick



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-31 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-31 18:11 substring offset Ken Martwick
2002-08-31 21:21 ` Ibraheem Umaru-Mohammed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).