I have strings like
uint8_t
char[5]
int[3]
How can I write a short function to get the type and length separately in an elegant way
for eg
uint8_t // return 'uint8_t', '1'
char[5] // return 'char', '5'
...
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let’s make it a one-liner:
Obviously you can do: