Determining underlying type of array in swift?
Determining underlying type of array in swift?
- Subject: Determining underlying type of array in swift?
- From: Rick Mann <email@hidden>
- Date: Wed, 09 Dec 2015 14:35:50 -0800
If I have var foo : [Int], how can I get that type, Int? I need to get the size of each element. Alternatively, I need the size of the array in bytes. I'd like to write the code generically. E.g., in C, I could do this:
int myArray[] = ...;
sizeof(*myArray)
Even if myArray is empty or NULL.
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden