<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Strchr</id>
		<title>Strchr - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Strchr"/>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;action=history"/>
		<updated>2026-04-26T15:46:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;diff=266&amp;oldid=prev</id>
		<title>Harald: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;diff=266&amp;oldid=prev"/>
				<updated>2016-10-27T16:03:01Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:03, 27 October 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Harald</name></author>	</entry>

	<entry>
		<id>http://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;diff=265&amp;oldid=prev</id>
		<title>Anonymous: New page: == Description ==  One day i find  strchr in NutApi:  char *strchr( const char * p, int ch)  {      for (;; ++p) {          if (*p == ch)              return ((char *) p);          if (!*p...</title>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;diff=265&amp;oldid=prev"/>
				<updated>2008-03-12T06:09:43Z</updated>
		
		<summary type="html">&lt;p&gt;New page: == Description ==  One day i find  strchr in NutApi:  char *strchr( const char * p, int ch)  {      for (;; ++p) {          if (*p == ch)              return ((char *) p);          if (!*p...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Description ==&lt;br /&gt;
 One day i find  strchr in NutApi:&lt;br /&gt;
 char *strchr( const char * p, int ch)&lt;br /&gt;
 {&lt;br /&gt;
     for (;; ++p) {&lt;br /&gt;
         if (*p == ch)&lt;br /&gt;
             return ((char *) p);&lt;br /&gt;
         if (!*p)&lt;br /&gt;
             return ((char *) NULL);&lt;br /&gt;
     }&lt;br /&gt;
     /* NOTREACHED */&lt;br /&gt;
 }&lt;br /&gt;
== Test Environment ==&lt;br /&gt;
 This sample should run on all platforms. I actually used: &lt;br /&gt;
 Nut/OS: Version 4.5.0 &lt;br /&gt;
 Hardware: ATmega128. &lt;br /&gt;
 Compiler: icc 7&lt;br /&gt;
 Debug tool: AVR Studio&lt;br /&gt;
== ''Source Code 1''==&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 char * test=&amp;quot;ethernut&amp;quot;;&lt;br /&gt;
 char *strchr_test( char * const p, int ch)&lt;br /&gt;
 {&lt;br /&gt;
     for (;; ++p) {&lt;br /&gt;
         if (*p == ch)&lt;br /&gt;
             return ((char *) p);&lt;br /&gt;
         if (!*p)&lt;br /&gt;
             return ((char *) NULL);&lt;br /&gt;
     }&lt;br /&gt;
     /* NOTREACHED */&lt;br /&gt;
 }&lt;br /&gt;
int main(void)&lt;br /&gt;
 {&lt;br /&gt;
     char * temp;&lt;br /&gt;
     temp=strchr_test(test,'e');&lt;br /&gt;
     printf(&amp;quot;%s\r\n&amp;quot;, temp);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 the result is : temp=NULL;&lt;br /&gt;
[[Image:UnExpected.JPG]]&lt;br /&gt;
&lt;br /&gt;
== ''Source Code 2'' ==&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 char * test=&amp;quot;ethernut&amp;quot;;&lt;br /&gt;
 char *strchr_test( const char  *  p, int ch)&lt;br /&gt;
 {&lt;br /&gt;
     for (;; ++p) {&lt;br /&gt;
         if (*p == ch)&lt;br /&gt;
             return ((char *) p);&lt;br /&gt;
         if (!*p)&lt;br /&gt;
             return ((char *) NULL);&lt;br /&gt;
     }&lt;br /&gt;
     /* NOTREACHED */&lt;br /&gt;
 }&lt;br /&gt;
 int main(void)&lt;br /&gt;
 {&lt;br /&gt;
 char * temp;&lt;br /&gt;
 temp=strchr(test,'e');&lt;br /&gt;
 printf(&amp;quot;%s\r\n&amp;quot;, temp);&lt;br /&gt;
 }&lt;br /&gt;
 And this time the result is as we expected: &lt;br /&gt;
[[Image:Expected.JPG]]&lt;br /&gt;
&lt;br /&gt;
== seek help ==&lt;br /&gt;
  Anyone who knows reasons, please keep in touch with me.&lt;br /&gt;
  I will be very grateful to him.&lt;br /&gt;
&lt;br /&gt;
  email: liyongming1982@163.com&lt;br /&gt;
  from: Guangzhou,China&lt;/div&gt;</summary>
		<author><name>Anonymous</name></author>	</entry>

	</feed>