 }
 
 private func fence(strings: [String], separator: String) -> String {
-    return separator + strings.joinWithSeparator(separator) + separator
+    #if swift(>=3)
+        return separator + strings.joined(separator: separator) + separator
+    #else
+        return separator + strings.joinWithSeparator(separator) + separator
+    #endif
 }
 
 public struct TextTableColumn {

    }

    public mutating func addRow(values: [CustomStringConvertible]) {
        let values = values.count >= columns.count ? values :
            values + [CustomStringConvertible](count: columns.count - values.count, repeatedValue: "")
        columns = zip(columns, values).map {
            (column, value) in
            var column = column

    private func withPadding(count: Int) -> String {
        let length = characters.count
        if length < count {
            #if swift(>=3)
                return self +
                    repeatElement(" ", count: count - length).joined(separator: "")
            #else
                return self +
                    Repeat(count: count - length, repeatedValue: " ").joinWithSeparator("")
            #endif
        }
        return self
    }

    func stripped() -> String {
        #if swift(>=3)
            let matches = strippingRegex
                .matches(in: self, options: [], range: NSRange(location: 0, length: self.characters.count))
                .map {
                    (self as NSString).substring(with: $0.range(at: 1))
            }
            return matches.isEmpty ? self : matches.joined(separator: "")
        #else
            let matches = strippingRegex
                .matchesInString(self, options: [], range: NSRange(location: 0, length: self.characters.count))
                .map {
                    (self as NSString).substringWithRange($0.rangeAtIndex(1))
            }
            return matches.isEmpty ? self : matches.joinWithSeparator("")
        #endif
    }

    func strippedLength() -> Int {
