Skip to content

Colorize the differences between two String in the simpliest possible way!

License

Notifications You must be signed in to change notification settings

alex010x/ColorDiffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ColorDiffy

Colorize the differences between two String in the simpliest possible way!

ColorDiffy only evaluates the differences on the second string compared to the first.

Requires:

iOS 9.0+ Swift 4.0+

Usage:

Cocoapods:

  1. Move to your project folder.
  2. pod init
  3. Open your Podfile and insert pod 'ColorDiffy'.
  4. pod install

Example with

UILabel 
import ColorDiffy

let myLabel = UILabel()
//if not specified, default color is red

myLabel.attributedText = ColorDiffy.findDifferencesBetween(stringOne: firstString, stringTwo: secondString)

OR

myLabel.attributedText = ColorDiffy.findDifferencesBetween(stringOne: firstString, stringTwo: secondString, color: UIColor.yellow)

alt text

About

Colorize the differences between two String in the simpliest possible way!

Resources

License

Stars

Watchers

Forks

Packages

No packages published