<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://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="https://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Strchr"/>
	<link rel="alternate" type="text/html" href="https://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;action=history"/>
	<updated>2026-12-03T09:28:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://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="https://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 style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; 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=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&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>https://www.ethernut.de/nutwiki/index.php?title=Strchr&amp;diff=265&amp;oldid=prev</id>
		<title>legacy&gt;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="https://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;
== &amp;#039;&amp;#039;Source Code 1&amp;#039;&amp;#039;==&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,&amp;#039;e&amp;#039;);&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;
== &amp;#039;&amp;#039;Source Code 2&amp;#039;&amp;#039; ==&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,&amp;#039;e&amp;#039;);&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>legacy&gt;Anonymous</name></author>
	</entry>
</feed>