FreeBSD Bugzilla – Attachment 17695 Details for
Bug 32054
inconsistency between index.3 and rindex.3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
index.3.diff
index.3.diff (text/plain), 1.11 KB, created by
metal
on 2001-11-18 07:30:13 UTC
(
hide
)
Description:
index.3.diff
Filename:
MIME Type:
Creator:
metal
Created:
2001-11-18 07:30:13 UTC
Size:
1.11 KB
patch
obsolete
>--- index.3.orig Sat Nov 17 23:12:56 2001 >+++ index.3 Sat Nov 17 23:16:40 2001 >@@ -38,7 +38,8 @@ > .Dt INDEX 3 > .Os > .Sh NAME >-.Nm index >+.Nm index , >+.Nm rindex > .Nd locate character in string > .Sh LIBRARY > .Lb libc >@@ -46,28 +47,37 @@ > .In string.h > .Ft char * > .Fn index "const char *s" "int c" >+.Ft char * >+.Fn rindex "const char *s" "int c" > .Sh DESCRIPTION > The > .Fn index >-function >-locates the first character matching >+function locates the first character matching > .Fa c > (converted to a > .Em char ) > in the null-terminated string > .Fa s . >+.Pp >+The >+.Fn rindex >+function behaves as well, except locates the last character matching >+.Fa c . > .Sh RETURN VALUES > A pointer to the character is returned if it is found; otherwise > .Dv NULL > is returned. > If > .Fa c >-is '\e0', >+is >+.Ql \e0 , > .Fn index >-locates the terminating '\e0'. >+and >+.Fn rindex >+locate the terminating >+.Ql \e0 . > .Sh SEE ALSO > .Xr memchr 3 , >-.Xr rindex 3 , > .Xr strchr 3 , > .Xr strcspn 3 , > .Xr strpbrk 3 , >@@ -77,7 +87,9 @@ > .Xr strstr 3 , > .Xr strtok 3 > .Sh HISTORY >-A >+The > .Fn index >-function appeared in >+and >+.Fn rindex >+functions appeared in > .At v6 .
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32054
:
17694
| 17695