tokenizerWithString 썸네일형 리스트형 [Objective-C] tokenizerWithString in ParseKit ParserKit을 이용하여 주어진 문자열을 토큰별로 분리 시키는 예제 먼저 문자열을 토큰별로 분리하여 그것에 대한 Type을 출력하는 예제이다. - (void) parserString{ NSString *s=@"2 !=sl/*한국어skd*/ bal @#WWW// comm"; PKTokenizer *t = [PKTokenizer tokenizerWithString:s]; PKToken *eof = [PKToken EOFToken]; PKToken *tok = nil; while(( tok = [t nextToken]) != eof){ NSLog(@"(%@) (%.f) : %@", tok.stringValue, tok.floatValue, [tok debugDescription]); } } 그래서 결과는 .. 더보기 이전 1 다음