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:
Richard Frith-Macdonald 2003-04-22 15:18:44 +00:00
parent 4d10090728
commit b065374e34

View file

@ -117,7 +117,7 @@ typedef struct {
}
}
/*
/**
* Create and return a scanner that scans aString.<br />
* 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
* conjunction with the -scanString:intoString: method.
* </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
intoString: (NSString **)value