Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 40 lines (33 sloc) 1.169 kb
4d4563c @JanX2 Objective C port of “diff-match-patch” as released in sub-folder “object...
authored
1 /*
2 * Diff Match and Patch
3 *
4 * Copyright 2010 geheimwerk.de.
5 * http://code.google.com/p/google-diff-match-patch/
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * Author: fraser@google.com (Neil Fraser)
20 * ObjC port: jan@geheimwerk.de (Jan Weiß)
21 */
22
23 #import "NSString+UnicharUtilities.h"
24
25
26 @implementation NSString (UnicharUtilities)
27
28 + (NSString *)diff_stringFromUnichar:(unichar)ch;
29 {
30 CFStringRef c = CFStringCreateWithCharacters(kCFAllocatorDefault, &ch, 1);
651e85d @JanX2 Adding support for Objective-C Garbage Collection.
authored
31 return [NSMakeCollectable(c) autorelease];
4d4563c @JanX2 Objective C port of “diff-match-patch” as released in sub-folder “object...
authored
32 }
33
34 - (NSString *)diff_substringWithCharacterAtIndex:(NSUInteger)anIndex;
35 {
36 return [self substringWithRange:NSMakeRange(anIndex, 1)];
37 }
38
39 @end
Something went wrong with that request. Please try again.