diff scripts/strings/strtok.m @ 8442:502e58a0d44f

Fix docstrings, add examples, references and tests to string functions
author Thorsten Meyer <thorsten.meyier@gmx.de>
date Mon, 05 Jan 2009 08:11:03 +0100
parents cf59d542f33e
children 2c8b2399247b
line wrap: on
line diff
--- a/scripts/strings/strtok.m	Tue Dec 30 00:25:20 2008 -0500
+++ b/scripts/strings/strtok.m	Mon Jan 05 08:11:03 2009 +0100
@@ -22,8 +22,21 @@
 ## Find all characters up to but not including the first character which
 ## is in the string delim.  If @var{rem} is requested, it contains the
 ## remainder of the string, starting at the first deliminator. Leading
-## delimiters are ignored.  If @var{delim} is not specified, space is assumed.
+## delimiters are ignored.  If @var{delim} is not specified, space is
+## assumed.  For example: 
+##
+## @example
+## @group
+## strtok ("this is the life")
+##      @result{} "this"
 ##
+## [tok, rem] = strtok ("14*27+31", "+-*/")
+##      @result{}
+##         tok = 14
+##         rem = *27+31
+## @end group
+## @end example
+## @seealso{index, split}
 ## @end deftypefn
 
 ## FIXME: check what to do for a null delimiter