Add trivial example

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16515 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-04-22 15:18:44 +00:00
parent 680441a813
commit 51aa80aeb2

View file

@ -117,7 +117,7 @@ typedef struct {
} }
} }
/* /**
* Create and return a scanner that scans aString.<br /> * Create and return a scanner that scans aString.<br />
* Uses -initWithString: and with no locale set. * Uses -initWithString: and with no locale set.
*/ */
@ -933,6 +933,18 @@ typedef struct {
* <p>To count the occurrances of string, this should be used in * <p>To count the occurrances of string, this should be used in
* conjunction with the -scanString:intoString: method. * conjunction with the -scanString:intoString: method.
* </p> * </p>
* <example>
* NSString *ch = @"[";
* unsigned total = 0;
*
* [scanner scanUpToString: ch intoString: NULL];
* while ([scanner scanString: ch intoString: NULL] == YES)
* {
* total++;
* [scanner scanUpToString: ch intoString: NULL];
* }
* NSLog(@"total %d", total);
* </example>
*/ */
- (BOOL) scanUpToString: (NSString *)string - (BOOL) scanUpToString: (NSString *)string
intoString: (NSString **)value intoString: (NSString **)value