 
     /// Applies the Formatter's Attributes into a given string, at the specified range.
     ///
-    func applyAttributes(to string: NSMutableAttributedString, at range: NSRange)
+    @discardableResult func applyAttributes(to string: NSMutableAttributedString, at range: NSRange) -> NSRange
 
     /// Removes the Formatter's Attributes from a given string, at the specified range.
     ///
-    func removeAttributes(from string: NSMutableAttributedString, at range: NSRange)
+    @discardableResult func removeAttributes(from string: NSMutableAttributedString, at range: NSRange) -> NSRange
 
     /// Checks if the attribute is present in a dictionary of attributes.
     ///

    ///     - text: Text that should be formatted.
    ///     - range: Segment of text which format should be toggled.
    ///
    @discardableResult func toggle(in text: NSMutableAttributedString, at range: NSRange) -> NSRange?

    /// Apply or removes formatter attributes to the provided attribute dictionary and returns it.
    ///


            text.addAttributes(attributes, range: range)
        }
        return rangeToApply
    }

    /// Toggles the Attribute Format, into a given string, at the specified range.
    ///
    @discardableResult
    func toggle(in text: NSMutableAttributedString, at range: NSRange) -> NSRange {
        //We decide if we need to apply or not the attribute based on the value on the initial position of the range
        let shouldApply =  shouldApplyAttributes(to: text, at: range)

        if shouldApply {
            return applyAttributes(to: text, at: range)
        } else {
            return removeAttributes(from: text, at: range)
        }        
    }
}

