I have this method in JavaScript:

```
if (str.length ==88) {      
    var strA=str.split("");
    strA=strA.slice(2);strA=swap(strA,1);strA=swap(strA,10);
    strA=strA.reverse();strA=strA.slice(2);strA=swap(strA,23);
    strA=strA.slice(3);strA=swap(strA,15);strA=swap(strA,34);
    str=strA.join("");
}

else if (str.length==87) {
        var strA=str.substr(44,40).split('').reverse().join('');
        var strB=str.substr(3,40).split('').reverse().join('');
        str=strA.substr(21,1)+strA.substr(1,20)+strA.substr(0,1)+strB.substr(22,9)+
        str.substr(0,1)+strA.substr(32,8)+str.substr(43,1)+strB;
} 

```

And i want to run it on `NSString` and get `NSString` to my `Objective-c` code.

It's possible?