summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strtok.3
diff options
context:
space:
mode:
authorghelmer <ghelmer@FreeBSD.org>1999-02-27 00:54:40 +0000
committerghelmer <ghelmer@FreeBSD.org>1999-02-27 00:54:40 +0000
commit62018e0afe7a95907a1854abc6d59852f741edb8 (patch)
tree88f68f05dff412ffd6d739e4d95f26103e32bc05 /lib/libc/string/strtok.3
parentee13d15d8f4dbbc16f743a3690a6e495279d5559 (diff)
downloadFreeBSD-src-62018e0afe7a95907a1854abc6d59852f741edb8.zip
FreeBSD-src-62018e0afe7a95907a1854abc6d59852f741edb8.tar.gz
Corrected use of backslash escaping in sample code.
PR: docs/10284 Submitted by: Alfred Perlstein <bright@cygnus.rush.net>
Diffstat (limited to 'lib/libc/string/strtok.3')
-rw-r--r--lib/libc/string/strtok.36
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3
index 92d32ce..6aa98c4 100644
--- a/lib/libc/string/strtok.3
+++ b/lib/libc/string/strtok.3
@@ -111,10 +111,10 @@ The following uses
to parse two strings using separate contexts:
.Bd -literal
char test[80], blah[80];
-char *sep = "\\/:;=-";
+char *sep = "\e\e/:;=-";
char *word, *phrase, *brkt, *brkb;
-strcpy(test, "This;is.a:test:of=the/string\\tokenizer-function.");
+strcpy(test, "This;is.a:test:of=the/string\e\etokenizer-function.");
for (word = strtok_r(test, sep, &brkt);
word;
@@ -126,7 +126,7 @@ for (word = strtok_r(test, sep, &brkt);
phrase;
phrase = strtok_r(NULL, sep, &brkb))
{
- printf("So far we're at %s:%s\n", word, phrase);
+ printf("So far we're at %s:%s\en", word, phrase);
}
}
.Ed
OpenPOWER on IntegriCloud