Question: I want to sort an NSMutableOrderedSet of strings, alphabetically. Is there a method? I've searched but can't find any.

Looking for something like this if it was an array: 

```
sortedArray = [originalArray sortedArrayUsingSelector:@selector
 (localizedCaseInsensitiveCompare:)];

```

Answer: 
```
[nameOfSet sortUsingComparator:(NSComparator)^(id obj1, id obj2){
    return [obj1 localizedCaseInsensitiveCompare:obj2]; }];
}

```
Use `localizedStandardCompare` instead of `localizedCaseInsensitiveCompare`, suppose you want 1, 2, 3, 4, 5 ...., 100 or more, then after 9 `localizedCaseInsensitiveCompare` is not able to sort your set, it will print like 1,10,2... etc. but `localizedStandardCompare` will sort accurately. 

```
[nameOfSet sortUsingComparator:(NSComparator)^(id obj1, id obj2){
        return [obj1 localizedStandardCompare:obj2]; }];

```

Thanks