This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func generateUniqueKey(keys: String...) -> String { | |
| let newArray = keys.sort() | |
| var cuttedStr = [String]() | |
| for str in newArray { | |
| let newString = NSString(string: str) | |
| let result = newString.substringWithRange(NSRange(location: 0, length: 8)) | |
| cuttedStr.append(result) | |
| } | |
| return cuttedStr.joinWithSeparator("-") | |
| } |
OlderNewer