Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

142 lines
6.6KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>Top (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="Top (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="Top (The Red Hat newlib C Library)">
  9. <meta name="resource-type" content="document">
  10. <meta name="distribution" content="global">
  11. <meta name="Generator" content="makeinfo">
  12. <link href="#Top" rel="start" title="Top">
  13. <link href="Document-Index.html#Document-Index" rel="index" title="Document Index">
  14. <link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
  15. <link href="../dir/index.html" rel="up" title="(dir)">
  16. <link href="Introduction.html#Introduction" rel="next" title="Introduction">
  17. <style type="text/css">
  18. <!--
  19. a.summary-letter {text-decoration: none}
  20. blockquote.indentedblock {margin-right: 0em}
  21. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  22. blockquote.smallquotation {font-size: smaller}
  23. div.display {margin-left: 3.2em}
  24. div.example {margin-left: 3.2em}
  25. div.lisp {margin-left: 3.2em}
  26. div.smalldisplay {margin-left: 3.2em}
  27. div.smallexample {margin-left: 3.2em}
  28. div.smalllisp {margin-left: 3.2em}
  29. kbd {font-style: oblique}
  30. pre.display {font-family: inherit}
  31. pre.format {font-family: inherit}
  32. pre.menu-comment {font-family: serif}
  33. pre.menu-preformatted {font-family: serif}
  34. pre.smalldisplay {font-family: inherit; font-size: smaller}
  35. pre.smallexample {font-size: smaller}
  36. pre.smallformat {font-family: inherit; font-size: smaller}
  37. pre.smalllisp {font-size: smaller}
  38. span.nolinebreak {white-space: nowrap}
  39. span.roman {font-family: initial; font-weight: normal}
  40. span.sansserif {font-family: sans-serif; font-weight: normal}
  41. ul.no-bullet {list-style: none}
  42. -->
  43. </style>
  44. </head>
  45. <body lang="en">
  46. <a name="Top"></a>
  47. <div class="header">
  48. <p>
  49. Next: <a href="Introduction.html#Introduction" accesskey="n" rel="next">Introduction</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  50. </div>
  51. <hr>
  52. <a name="The-Red-Hat-newlib-C-Library"></a>
  53. <h1 class="top">The Red Hat newlib C Library</h1>
  54. <table class="menu" border="0" cellspacing="0">
  55. <tr><td align="left" valign="top">&bull; <a href="Introduction.html#Introduction" accesskey="1">Introduction</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  56. </td></tr>
  57. <tr><td align="left" valign="top">&bull; <a href="Stdlib.html#Stdlib" accesskey="2">Stdlib</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  58. </td></tr>
  59. <tr><td align="left" valign="top">&bull; <a href="Ctype.html#Ctype" accesskey="3">Ctype</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  60. </td></tr>
  61. <tr><td align="left" valign="top">&bull; <a href="Stdio.html#Stdio" accesskey="4">Stdio</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  62. </td></tr>
  63. <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
  64. </pre></th></tr><tr><td align="left" valign="top">&bull; <a href="Strings.html#Strings" accesskey="5">Strings</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  65. </td></tr>
  66. <tr><td align="left" valign="top">&bull; <a href="Wchar-strings.html#Wchar-strings" accesskey="6">Wchar strings</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  67. </td></tr>
  68. <tr><td align="left" valign="top">&bull; <a href="Signals.html#Signals" accesskey="7">Signals</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  69. </td></tr>
  70. <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
  71. </pre></th></tr><tr><td align="left" valign="top">&bull; <a href="Timefns.html#Timefns" accesskey="8">Timefns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  72. </td></tr>
  73. <tr><td align="left" valign="top">&bull; <a href="Locale.html#Locale" accesskey="9">Locale</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  74. </td></tr>
  75. <tr><td align="left" valign="top">&bull; <a href="Reentrancy.html#Reentrancy">Reentrancy</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  76. </td></tr>
  77. <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
  78. </pre></th></tr><tr><td align="left" valign="top">&bull; <a href="Misc.html#Misc">Misc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  79. </td></tr>
  80. <tr><td align="left" valign="top">&bull; <a href="Syscalls.html#Syscalls">Syscalls</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  81. </td></tr>
  82. <tr><td align="left" valign="top">&bull; <a href="Arglists.html#Arglists">Arglists</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  83. </td></tr>
  84. <tr><td align="left" valign="top">&bull; <a href="Overflow-Protection.html#Overflow-Protection">Overflow Protection</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  85. </td></tr>
  86. <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
  87. </pre></th></tr><tr><td align="left" valign="top">&bull; <a href="Document-Index.html#Document-Index">Document Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  88. </td></tr>
  89. </table>
  90. <a name="index"></a>
  91. <div class="header">
  92. <p>
  93. Next: <a href="memccpy.html#memccpy" accesskey="n" rel="next">memccpy</a>, Previous: <a href="bzero.html#bzero" accesskey="p" rel="prev">bzero</a>, Up: <a href="Strings.html#Strings" accesskey="u" rel="up">Strings</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  94. </div>
  95. <a name="index_002d_002d_002dsearch-for-character-in-string"></a>
  96. <h3 class="section">5.4 <code>index</code>&mdash;search for character in string</h3>
  97. <a name="index-index"></a>
  98. <p><strong>Synopsis</strong>
  99. </p><div class="example">
  100. <pre class="example">#include &lt;strings.h&gt;
  101. char * index(const char *<var>string</var>, int <var>c</var>);
  102. </pre></div>
  103. <p><strong>Description</strong><br>
  104. This function finds the first occurence of <var>c</var> (converted to
  105. a char) in the string pointed to by <var>string</var> (including the
  106. terminating null character).
  107. </p>
  108. <p>This function is identical to <code>strchr</code>.
  109. </p>
  110. <br>
  111. <p><strong>Returns</strong><br>
  112. Returns a pointer to the located character, or a null pointer
  113. if <var>c</var> does not occur in <var>string</var>.
  114. </p>
  115. <br>
  116. <p><strong>Portability</strong><br>
  117. <code>index</code> requires no supporting OS subroutines.
  118. </p>
  119. <br>
  120. </body>
  121. </html>