ref2401 wrote:

> i have an array of ubytes. how can i convert two adjacent ubytes
> from the array to an integer?
> 
> pseudocode example:
> ubyte[5] array = createArray();
> int value = array[2..3];
> 
> is there any 'memcpy' method or something else to do this?

Try to use littleEndianToNative or bigEndianToNative, but you should check 
the endianes of the data that you desire convert to a int.
For example:
  ubyte[5] array = createArray();
  int value = littleEndianToNative!int(array);
  // or:
  // int value = bigEndianToNative!int(array);

-- 
I'm afraid that I have a blog: http://zardoz.es 

Reply via email to