Skip to content

Instantly share code, notes, and snippets.

-(NSArray*)objectForKeyedSubscript:(NSString*)pattern
{
NSError *error;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:&error];
NSAssert( ! error, @"regex processing error");
NSMutableArray *strings = [NSMutableArray new];
NSArray *matches = [regex matchesInString:self options:0 range:self.fullRange];
for(NSTextCheckingResult *match in matches) {
for (NSInteger i = 0; i < match.numberOfRanges; i++) {
- (NSString *):(id)a {
return [self stringByAppendingString:[a description]];
}
- (NSString *):(id)a :(id)b { return [[self:a]:b];}
- (NSString *):(id)a :(id)b :(id)c
{ return [[[self:a]:b]:c]; }
#import <MobileCoreServices/MobileCoreServices.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import "TTVideo.h"
#define BYTES_PER_PIXEL 4
@interface TTVideo ()
// Redeclared as readwrite so that we can write to the property and still be atomic with external readers.
@property (readwrite, nonatomic) Float64 videoFrameRate;
await
retrieveUsers(
(users) -> defer users
)
await
retrieveUsers(
() -> defer users
)