mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
680441a813
commit
51aa80aeb2
1 changed files with 13 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue