Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A set of Objective-C additions and macros that helps you write code more quickly.
Objective-C C
tree: b177209b9e

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CKMacros.h
ConciseKit.h
LICENSE
README.markdown

README.markdown

ConciseKit 0.0.1

A set of Objective-C additions and macros that lets you to write code more quickly.

Macros

General shorthands

    $new(Foo)       => [[[Foo alloc] init] autorelease]
    $eql(foo, bar)  => [foo isEqual:bar]

NSArray shorthands

    $arr(foo, bar)   =>  [NSArray arrayWithObjects:foo, bar, nil]
    $marr(foo, bar)  =>  [NSMutableArray ...]

NSSet shorthands

    $set(foo, bar)   =>  [NSSet setWithObjects:foo, bar, nil]
    $mset(foo, bar)  =>  [NSMutableSet ...]

NSDictionary shorthands

    $dict(v1, k1, v2, k2)  => [NSDictionary dictionaryWithObjectsAndKeys:v1, k1, v2, k2, nil]
    $mdict(v1, k1, v2, k2) => [NSMutableDictionary ...]

NSString shorthands

    $str(@"foo: %@", bar)   => [NSString stringWithFormat:@"foo: %@", bar]
    $mstr(@"foo: %@", bar)  => [NSMutableString ...]

NSNumber shorthands

    $bool(YES)    => [NSNumber numberWithBool:YES]
    $int(123)     => [NSNumber numberWithInt:123]
    $float(123.4) => [NSNumber numberWithFloat:123.4]

    $char(), $double(), $integer(), $long(), $longLong(), $short(), 
    $uChar(), $uInt(), $uInteger(), $uLong(), $uLongLong(), $uShort()

NSValue shorthands

    $nonRetained(), $pointer(), $point(), $range(), $rect(), $size()

Additions

License

Copyright (c) 2010 Peter Jihoon Kim. This code is licensed under the MIT License.

Something went wrong with that request. Please try again.