Skip to content

Instantly share code, notes, and snippets.

@coybit
Forked from jensellfors/JAConcat.m
Created February 23, 2014 16:35
Show Gist options
  • Select an option

  • Save coybit/9173721 to your computer and use it in GitHub Desktop.

Select an option

Save coybit/9173721 to your computer and use it in GitHub Desktop.

Revisions

  1. Jens Andersson revised this gist Jan 5, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion JAConcat.m
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,4 @@
    /*
    * Example
    */
    NSString *string = $(@"Hello", @" ", @"World!", @"\n", @"1 + 2 = ", @(1+2));
    NSString *string = $(@"Hello", @" ", @"World!", @"\n", @"1 + 2 = ", @(1+2));
  2. Jens Andersson created this gist Jan 5, 2014.
    7 changes: 7 additions & 0 deletions JAConcat.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #define $(...) ((NSString *)[[NSArray arrayWithObjects:__VA_ARGS__, nil] componentsJoinedByString:@""])


    /*
    * Example
    */
    NSString *string = $(@"Hello", @" ", @"World!", @"\n", @"1 + 2 = ", @(1+2));