         var tail = ""
         let location = range.location + range.length
         if location <= self.attributedText.length {
-            tail = self.attributedText.attributedSubstringFromRange(NSMakeRange(location - 1, 1)).string
+            tail = self.attributedText.substring(NSMakeRange(location - 1, 1))
             if tail == "\n" && location - 2 >= 0 {  // 行末が改行の場合は、改行文字の前の文字を取得する。
-                tail = self.attributedText.attributedSubstringFromRange(NSMakeRange(location - 2, 1)).string
+                tail = self.attributedText.substring(NSMakeRange(location - 2, 1))
             }
         }
         return tail

                        options: [.UsesLineFragmentOrigin], context: nil).size.width)
                ) / 2
        default:
            break
        }
        return offset
    }

     */
    private func getSuggestedLineCount(offset: CGFloat? = nil) -> (Int, Bool, Bool) {
        let lineWidth: CGFloat = self.width + (offset ?? self.getOffset())
        var currentLineCount = CTTypesetterSuggestLineBreak(self.typesetter, self.location, Double(lineWidth))
        var range = self.getCurrentLineRange(currentLineCount)
        var (didBurasagari, didOikomi) = (false, false)

        if let alignment = self.attributedText.textAlignment where alignment == .Justified {
            if range.location + range.length + 2 <= self.length {  // 1文字加算しても全体の文字数に収まるか
                let tmpTail = self.attributedText.substring(NSMakeRange(range.location + range.length + 1, 1))  // 次の行の2文字目
                if kCharactersCanBurasagari.contains(tmpTail) {
                    range = NSMakeRange(range.location, range.length + 2)
                    currentLineCount = range.length
                    didBurasagari = true
                } else if kCharactersCanOikomi.contains(tmpTail) {
                    range = NSMakeRange(range.location, range.length + 2)
                    currentLineCount = range.length
                    didOikomi = true
                }
            }
        }
        return (currentLineCount, didBurasagari, didOikomi)
