         return message.substringWithRange(range)
     }
     
-    mutating func readUntilStringOccurence(string:String) -> String? {
+    mutating func readUntilStringOccurence(string: String) -> String? {
         let startIndex = message.startIndex.advancedBy(currentIndex)
         let range = Range<String.Index>(start: startIndex, end: message.endIndex)
         let subString = message.substringWithRange(range) as NSString

    let message: String
    var currentIndex: Int
    var messageCharacters: [Character] {
        get {
            return Array(message.characters)
        }
    }
    var currentCharacter: String? {
        get{
            if currentIndex >= messageCharacters.count {
                return nil
            }
            return String(messageCharacters[currentIndex])
        }
    }
    
    mutating func read(characterLength:Int) -> String? {
        let startIndex = message.startIndex.advancedBy(currentIndex)
        let range = Range<String.Index>(start: startIndex, end: startIndex.advancedBy(characterLength))
        currentIndex = currentIndex + characterLength

        return subString.substringToIndex(foundRange.location)
    }
    
    mutating func readUntilEnd() -> String {
        return read(messageCharacters.count - currentIndex)!
    }
}