iphone Programming Glossary: isatend
Remove all but numbers from NSString http://stackoverflow.com/questions/1129521/remove-all-but-numbers-from-nsstring originalString NSCharacterSet numbers NSCharacterSet characterSetWithCharactersInString @ 0123456789 while scanner isAtEnd NO NSString buffer if scanner scanCharactersFromSet numbers intoString buffer strippedString appendString buffer else scanner..
Convert to Float and Calculate http://stackoverflow.com/questions/14155360/convert-to-float-and-calculate formattedString NSMutableString alloc init NSScanner theScanner NSScanner scannerWithString formula while theScanner isAtEnd NO if theScanner scanFloat aFloat formattedString appendString NSString stringWithFormat @ f aFloat if theScanner scanUpToCharactersFromSet..
filter data from mediawiki api ios http://stackoverflow.com/questions/17831524/filter-data-from-mediawiki-api-ios NSScanner scanner NSScanner scannerWithString strTest scanner scanUpToString startString intoString nil while scanner isAtEnd NSString substring nil scanner scanString startString intoString nil if scanner scanUpToString endString intoString substring..
Replace unicode value in string http://stackoverflow.com/questions/19564950/replace-unicode-value-in-string scannerWithString str scanner setCharactersToBeSkipped nil NSMutableString result NSMutableString string while scanner isAtEnd NSString tmp Copy all non control characters verbatim if scanner scanUpToCharactersFromSet controls intoString tmp result.. characters verbatim if scanner scanUpToCharactersFromSet controls intoString tmp result appendString tmp if scanner isAtEnd break Escape all control characters if scanner scanCharactersFromSet controls intoString tmp for int i 0 i tmp length i..
iPhone xCode - How to convert NSString HTML markup to Plain text NSString? http://stackoverflow.com/questions/2606134/iphone-xcode-how-to-convert-nsstring-html-markup-to-plain-text-nsstring NSString html NSScanner theScanner NSString text nil theScanner NSScanner scannerWithString html while theScanner isAtEnd NO theScanner scanUpToString @ intoString NULL theScanner scanUpToString @ intoString text html html stringByReplacingOccurrencesOfString..
CSV parser with low memory footprint for iPhone http://stackoverflow.com/questions/3031181/csv-parser-with-low-memory-footprint-for-iphone A quick fix would be to create an NSAutoreleasePool at the lop of the loop and drain it at the bottom while scanner isAtEnd NSAutoreleasePool innerPool NSAutoreleasePool alloc init ... bunch of code... innerPool drain This will wipe out the temporary..
How to extract the image source from an rss string http://stackoverflow.com/questions/6081064/how-to-extract-the-image-source-from-an-rss-string scannerWithString newsRSSFeed find start of IMG tag theScanner scanUpToString @ img intoString nil if theScanner isAtEnd theScanner scanUpToString @ src intoString nil NSCharacterSet charset NSCharacterSet characterSetWithCharactersInString..
Strip out HTML Tags etc from NSString [duplicate] http://stackoverflow.com/questions/6170531/strip-out-html-tags-etc-from-nsstring BOOL trim NSScanner theScanner NSString text nil theScanner NSScanner scannerWithString html while theScanner isAtEnd NO find start of tag theScanner scanUpToString @ intoString NULL find end of tag theScanner scanUpToString @ intoString.. scanner NSScanner scannerWithString str scanner.charactersToBeSkipped NULL NSString tempText nil while scanner isAtEnd scanner scanUpToString @ intoString tempText if tempText nil html appendString tempText scanner scanUpToString @ intoString..
separate the ids and store in two different array http://stackoverflow.com/questions/6206312/separate-the-ids-and-store-in-two-different-array scannerWithString newsRSSFeed find start of IMG tag theScanner scanUpToString @ img intoString nil if theScanner isAtEnd theScanner scanUpToString @ src intoString nil NSCharacterSet charset NSCharacterSet characterSetWithCharactersInString..
|