mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
4d10090728
commit
b065374e34
1 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue