SwiftPlusPlus simply brings the pre and post increment and decrement operators back to Swift 3, so that you can write this again:
var index: Int
index++
++index
--index
index--
Note that it works as a standalone statement, without returning the variable value before or after the increment/decrement. So do NOT expect to use it in code like:
if index++ {
...
}
That's just a personal choice - I think that usage may introduce subtle bugs, so I have never used, nor I use in C++ or other languages where these operators are available.
However, I love the operator when used standalone. Maybe for historical reasons, as it's the first thing I learned and loved in C, long long ago.
Just copy the SwiftPlusPlus.swift
file into your Xcode project
pod 'SwiftPlusPlus'
N/A yet
N/A yet
In case of manual installation, the operators can be used anywhere in the code without any import.
Using cocoapods instead you need to add import spp
in each file where the operators are used.
N/A yet
N/A yet
MIT
Read the LICENSE
file