Find permutation in a string (Swift)

func permute(strInput:String,l:Int,r:Int){var inputCharacter = Array(strInput)if ( l==r){print(strInput)}else{for var i in l..<r{// Swapping doneinputCharacter.swapAt(l, i);// Recursion calledpermute(strInput: String(inputCharacter), l: l+1, r: r);//backtrackinputCharacter.swapAt(l, i);