#include <Foundation/Foundation.h>

static NSString *foo(NSString *s)
{
  NSMutableString *ss = [[s mutableCopy] autorelease];
  [ss replaceOccurrencesOfString:@">" withString:@"&gt;" options:NSLiteralSearch range:NSMakeRange(0, [ss length])];
  NSLog(@" \"%@\" => \"%@\"", s, ss);
  return ss;
}

int main(int argc, const char *argv[])
{
  NSAutoreleasePool *pool = [NSAutoreleasePool new];
  int status = 0;
  foo(@"> foo > bar > zot > mumble > xyz");

  [pool release];
  return status;
}
