T
Tobias
Hey Guys
I'm programming a map which redefines some Unicode Characters like Äš
to the "normal" letter E, just for fun. My question is now how the
detailed usage of isleadbyte() works. I have some code here:
______________
_____________
So, this is my problem:
if( isleadbyte(atoi(ptr)) = 0 )
I'd like to know if the char "ptr" is points to is a leadbyte or not.
best regards,
TSchmitt
I'm programming a map which redefines some Unicode Characters like Äš
to the "normal" letter E, just for fun. My question is now how the
detailed usage of isleadbyte() works. I have some code here:
______________
/// gsUCHAR_CONVMAP is a tuple of char and char[] where the replacers an the map is defined.
std::string unicodevert(char ArrayToTransform[])
{
char *ToConv = ArrayToTransform; // Points ToConv on ConvSource
char *ptr; // iterating Pointer
char *anotherHelper;
for(int i=0; i <= 38; i++) { // * Do it for every Map table
ptr = strpbrk(ToConv,gsUCHAR_CONVMAP.MAP); // * Jump to first char to correct
while(NULL != ptr) // * Do this for the full string
{
if( isleadbyte(atoi(ptr)) = 0 )
ptr = strpbrk((ptr+2),gsUCHAR_CONVMAP.MAP);
else
{
memmove_s(ptr++, sizeof(*ptr), ptr++, sizeof(*ptr));
*ptr = gsUCHAR_CONVMAP.REPLACER; // ** Sóurce Char is
ptr = strpbrk(ptr++,gsUCHAR_CONVMAP.MAP); // ** Jump to
}
}
}
return (std::string)ToConv; //Returns the converted string in a String.
}
_____________
So, this is my problem:
if( isleadbyte(atoi(ptr)) = 0 )
I'd like to know if the char "ptr" is points to is a leadbyte or not.
best regards,
TSchmitt