Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (29 sloc) 0.63 kb
//
// NSScanner+SkipUpToCharset.m
// UKSyntaxColoredDocument
//
// Created by Uli Kusterer on Sat Dec 13 2003.
// Copyright (c) 2003 M. Uli Kusterer. All rights reserved.
//
#import "NSScanner+SkipUpToCharset.h"
@implementation NSScanner (UKSkipUpToCharset)
-(BOOL) skipUpToCharactersFromSet:(NSCharacterSet*)set
{
NSString* vString = [self string];
int x = [self scanLocation];
while( x < [vString length] )
{
if( ![set characterIsMember: [vString characterAtIndex: x]] )
x++;
else
break;
}
if( x > [self scanLocation] )
{
[self setScanLocation: x];
return YES;
}
else
return NO;
}
@end
Jump to Line
Something went wrong with that request. Please try again.