         
         assert( i < self.length, "Index is out of range")
         
-        return self[advance(self.startIndex, i)]
+        return self[self.startIndex.advancedBy(i)]
     }
     
     subscript (str: String) -> Int {

        
        assert(possibleIndex != nil, "Substring not found")
        
        return "\(self.rangeOfString(str)!.startIndex)".toInt()!
    }
    
    subscript (str_start: String, str_end: String) -> String {

    
    // Escape HTML string
    var htmlescape: String? {
        return self.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())
    }
    
    // Unescape HTML string
    var htmlunescape: String? {
        return self.stringByRemovingPercentEncoding
    }
    
    // Convert to lowercase using locale string
    var lowercaselocale: String {
        return self.lowercaseStringWithLocale(NSLocale.currentLocale())
