From a12e4a2ae8213537508f41088acc59b019ea672c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 18 Sep 2004 06:34:27 +0000 Subject: [PATCH] Clarify strtok_r() description. --- src/lib/string.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/string.c b/src/lib/string.c index bec4444..cb042f0 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -212,7 +212,9 @@ strstr (const char *haystack, const char *needle) single string. strtok_r() modifies the string S, changing delimiters to null - bytes. Thus, S must be a modifiable string. + bytes. Thus, S must be a modifiable string. String literals, + in particular, are *not* modifiable in C, even though for + backward compatibility they are not `const'. Example usage: -- 2.30.2