glenjoy
Banned

- Joined
- Jan 1, 2004
- Messages
- 962
- Helped
- 72
- Reputation
- 146
- Reaction score
- 20
- Trophy points
- 1,298
- Location
- Philippines
- Activity points
- 0
arabic counting in ascii
I am having a problem in knowing if how many ASCII or non-ASCII character there is in a certain string, as I've noticed that strlen() only counts ASCII characters and stops on a NULL, so if there is a NULL in between my array, it will stop counting and will leave the sequence.
Is there a command that I will know the lenght or number of ASCII or non-ASCII chracter inside an array?
Thanks.
Added after 13 minutes:
Added after 44 seconds:
Your help will be much appreciated.
I am having a problem in knowing if how many ASCII or non-ASCII character there is in a certain string, as I've noticed that strlen() only counts ASCII characters and stops on a NULL, so if there is a NULL in between my array, it will stop counting and will leave the sequence.
Is there a command that I will know the lenght or number of ASCII or non-ASCII chracter inside an array?
Thanks.
Added after 13 minutes:
Code:
{
unsigned char x;
unsigned char data[] = {'A','B','C','D','E','F','G','H','I',};
unsigned char data_1[] = {"ABCDEFGHI"};
// results
printF(" %d ",strlen(data)); // ---- > 18
printf(" %d ",strlen(data_1)); //-----> 9
printF("sf%d",sizeof(data)); //-----> 9
printf(" sf%d",sizeof(data_1)); //---->10
}
Added after 44 seconds:
Your help will be much appreciated.