 }
 */
 
-extension Int32 : LogicValue {
-  
-  public func getLogicValue() -> Bool {
+extension Int32 : BooleanType {
+  
+  public var boolValue : Bool {
     return self != 0
   }
   

    }
    
    var cstr = [CChar](count: data.count + 1, repeatedValue: 0)
    cstr.withUnsafePointerToElements { dest in  // cannot just use cstr!
      data.withUnsafePointerToElements { src in
        memcpy(dest, src, UInt(data.count))
      }
    }
    cstr[data.count] = 0 // 0-terminate
    
    // var s = "" // direct return seems to crash things, not sure why
    return cstr.withUnsafePointerToElements {
      return String.fromCString($0)!
    }
  }
  
  func dataInCStringEncoding() -> [UInt8] {
    return self.withCString { (cstr: ConstUnsafePointer<CChar>) in
      let len  = strlen(cstr)
      if len < 1 {
        return [UInt8]()
      }
      var buf = [UInt8](count: Int(len), repeatedValue: 0)
      buf.withUnsafePointerToElements { dest in
        memcpy(dest, cstr, len)
      }
      return buf
    }
  }

import Darwin

// This allows you to do: str[str.startIndex..idx+4]
public func +<T: ForwardIndexType>(idx: T, distance: T.DistanceType) -> T {
  return advance(idx, distance)
}
public func +<T: ForwardIndexType>(distance: T.DistanceType, idx: T) -> T {
  return advance(idx, distance)
}

public func -<T:BidirectionalIndexType where T.DistanceType : SignedIntegerType>
  (idx: T, distance: T.DistanceType) -> T
{
  var cursor = idx
