Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit aa9ce4f

Browse files
committed
core.stdc.string: Organize alphabetically
It makes it easier to follow and compare to existing documentation.
1 parent f73787a commit aa9ce4f

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/core/stdc/string.d

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,25 @@ size_t strcspn(scope const char* s1, scope const char* s2) pure;
6666
char* strdup(scope const char *s);
6767
///
6868
char* strerror(int errnum);
69+
// This `strerror_r` definition is not following the POSIX standard
70+
version (ReturnStrerrorR)
71+
{
72+
///
73+
const(char)* strerror_r(int errnum, return char* buf, size_t buflen);
74+
}
75+
// This one is
76+
else
77+
{
78+
int strerror_r(int errnum, scope char* buf, size_t buflen);
79+
}
6980
///
70-
char* strncpy(return char* s1, scope const char* s2, size_t n) pure;
81+
size_t strlen(scope const char* s) pure;
7182
///
7283
char* strncat(return char* s1, scope const char* s2, size_t n) pure;
7384
///
7485
int strncmp(scope const char* s1, scope const char* s2, size_t n) pure;
7586
///
76-
size_t strxfrm(scope char* s1, scope const char* s2, size_t n);
87+
char* strncpy(return char* s1, scope const char* s2, size_t n) pure;
7788
///
7889
inout(char)* strpbrk(return inout(char)* s1, scope const char* s2) pure;
7990
///
@@ -84,17 +95,5 @@ size_t strspn(scope const char* s1, scope const char* s2) pure;
8495
inout(char)* strstr(return inout(char)* s1, scope const char* s2) pure;
8596
///
8697
char* strtok(return char* s1, scope const char* s2);
87-
// This `strerror_r` definition is not following the POSIX standard
88-
version (ReturnStrerrorR)
89-
{
90-
///
91-
const(char)* strerror_r(int errnum, return char* buf, size_t buflen);
92-
}
93-
// This one is
94-
else
95-
{
96-
///
97-
int strerror_r(int errnum, scope char* buf, size_t buflen);
98-
}
9998
///
100-
size_t strlen(scope const char* s) pure;
99+
size_t strxfrm(scope char* s1, scope const char* s2, size_t n);

0 commit comments

Comments
 (0)