     {
         if let regex = TPFoundation.regex(pattern, ignoreCase: ignoreCase)
         {
-            let range = NSMakeRange(0, lenght)
+            let range = NSMakeRange(0, length)
             return regex.stringByReplacingMatches(in: self, options: [.anchored], range: range, withTemplate: replacementString)
         }
         

    
    public func count() -> Int
    {
        return lenght
    }
    
    public subscript (i:Int) -> Character

        return String(characters.suffix(1))
    }
    
    public var length: Int
    {
        return characters.count
    }
