     var inMantissa: Bool = false
     var isNegative: Bool = false
     let decimalPoint = self._localDecimalPoint()
-    
+
     for (i, c) in self.characters.enumerate() {
       if i == 0 && c == "-" {
         isNegative = true
         continue
       }
-      
+
       if c == decimalPoint {
         inMantissa = true
         continue
       }
-      
+
       if Int(String(c)) != nil {
         if !inMantissa {
           characteristic.append(c)

  func paddedToWidth(width: Int, padBy: Character = " ") -> String {
    var s = self
    var currentLength = self.characters.count
    
    while currentLength++ < width {
      s.append(padBy)
    }
    
    return s
  }
  
  /**
   * Wraps a string to the specified width.
   * 
   * This just does simple greedy word-packing, it doesn't go full Knuth-Plass.
   * If a single word is longer than the line width, it will be placed (unsplit)
   * on a line by itself.

  func wrappedAtWidth(width: Int, wrapBy: Character = "\n", splitBy: Character = " ") -> String {
    var s = ""
    var currentLineWidth = 0

    for word in self.splitByCharacter(splitBy) {
      let wordLength = word.characters.count

      if currentLineWidth + wordLength + 1 > width {
        /* Word length is greater than line length, can't wrap */
        if wordLength >= width {
          s += word
        }

        s.append(wrapBy)
        currentLineWidth = 0
      }

      currentLineWidth += wordLength + 1
      s += word
      s.append(splitBy)
    }

    return s
  }
}

#if os(Linux)
/**
 *  Returns `true` iff `self` begins with `prefix`.
 *
 *  A basic implementation of `hasPrefix` for Linux.
 *  Should be removed once a proper `hasPrefix` patch makes it to the Swift 2.2 development branch.
 */
extension String {
  func hasPrefix(prefix: String) -> Bool {
    if prefix.isEmpty {
      return false
    }

    let c = self.characters
    let p = prefix.characters

    if p.count > c.count {
      return false
    }

    for (c, p) in zip(c.prefix(p.count), p) {
      guard c == p else {
        return false
      }
    }

    return true
  }

  /**
   *  Returns `true` iff `self` ends with `suffix`.
   *
   *  A basic implementation of `hasSuffix` for Linux.
   *  Should be removed once a proper `hasSuffix` patch makes it to the Swift 2.2 development branch.
   */
  func hasSuffix(suffix: String) -> Bool {
    if suffix.isEmpty {
      return false
    }

    let c = self.characters
    let s = suffix.characters

    if s.count > c.count {
      return false
    }

    for (c, s) in zip(c.suffix(s.count), s) {
      guard c == s else {
        return false
      }
    }

    return true
  }
}
#endif
