diff options
| author | espie <> | 1999-09-21 16:44:01 +0000 |
|---|---|---|
| committer | espie <> | 1999-09-21 16:44:01 +0000 |
| commit | eddda6bf00c124288aea38cccb8f6cbd44e6a13b (patch) | |
| tree | 78f295f62064116a7fdc2f6a38a0d0813eb4d2ad /src/lib/libc/string/strchr.3 | |
| parent | 7888080e5d9ce71af4015e34c3c3a0a0d3d3119a (diff) | |
| download | openbsd-eddda6bf00c124288aea38cccb8f6cbd44e6a13b.tar.gz openbsd-eddda6bf00c124288aea38cccb8f6cbd44e6a13b.tar.bz2 openbsd-eddda6bf00c124288aea38cccb8f6cbd44e6a13b.zip | |
index/rindex as deprecated synonyms to strchr/strrchr.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/string/strchr.3 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/libc/string/strchr.3 b/src/lib/libc/string/strchr.3 index 2980f9bc87..5b117b83ca 100644 --- a/src/lib/libc/string/strchr.3 +++ b/src/lib/libc/string/strchr.3 | |||
| @@ -33,18 +33,21 @@ | |||
| 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 34 | .\" SUCH DAMAGE. | 34 | .\" SUCH DAMAGE. |
| 35 | .\" | 35 | .\" |
| 36 | .\" $OpenBSD: strchr.3,v 1.5 1999/06/06 06:57:52 pjanzen Exp $ | 36 | .\" $OpenBSD: strchr.3,v 1.6 1999/09/21 16:44:01 espie Exp $ |
| 37 | .\" | 37 | .\" |
| 38 | .Dd June 29, 1991 | 38 | .Dd June 29, 1991 |
| 39 | .Dt STRCHR 3 | 39 | .Dt STRCHR 3 |
| 40 | .Os | 40 | .Os |
| 41 | .Sh NAME | 41 | .Sh NAME |
| 42 | .Nm strchr | 42 | .Nm strchr , |
| 43 | .Nm index | ||
| 43 | .Nd locate first occurrence of a character in a string | 44 | .Nd locate first occurrence of a character in a string |
| 44 | .Sh SYNOPSIS | 45 | .Sh SYNOPSIS |
| 45 | .Fd #include <string.h> | 46 | .Fd #include <string.h> |
| 46 | .Ft char * | 47 | .Ft char * |
| 47 | .Fn strchr "const char *s" "int c" | 48 | .Fn strchr "const char *s" "int c" |
| 49 | .Ft char * | ||
| 50 | .Fn index "const char *s" "int c" | ||
| 48 | .Sh DESCRIPTION | 51 | .Sh DESCRIPTION |
| 49 | The | 52 | The |
| 50 | .Fn strchr | 53 | .Fn strchr |
| @@ -60,6 +63,11 @@ is | |||
| 60 | .Fn strchr | 63 | .Fn strchr |
| 61 | locates the terminating | 64 | locates the terminating |
| 62 | .Ql \e0 . | 65 | .Ql \e0 . |
| 66 | .Pp | ||
| 67 | The | ||
| 68 | .Fn index | ||
| 69 | function is an old synonym for | ||
| 70 | .Fn strchr . | ||
| 63 | .Sh RETURN VALUES | 71 | .Sh RETURN VALUES |
| 64 | The | 72 | The |
| 65 | .Fn strchr | 73 | .Fn strchr |
| @@ -79,9 +87,7 @@ char *s = "foobar"; | |||
| 79 | p = strchr(s, 'o'); | 87 | p = strchr(s, 'o'); |
| 80 | .Ed | 88 | .Ed |
| 81 | .Sh SEE ALSO | 89 | .Sh SEE ALSO |
| 82 | .Xr index 3 , | ||
| 83 | .Xr memchr 3 , | 90 | .Xr memchr 3 , |
| 84 | .Xr rindex 3 , | ||
| 85 | .Xr strcspn 3 , | 91 | .Xr strcspn 3 , |
| 86 | .Xr strpbrk 3 , | 92 | .Xr strpbrk 3 , |
| 87 | .Xr strrchr 3 , | 93 | .Xr strrchr 3 , |
| @@ -95,3 +101,7 @@ The | |||
| 95 | function | 101 | function |
| 96 | conforms to | 102 | conforms to |
| 97 | .St -ansiC . | 103 | .St -ansiC . |
| 104 | .Pp | ||
| 105 | The | ||
| 106 | .Fn index | ||
| 107 | function is deprecated and shouldn't be used in new code. | ||
