View Single Post
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 01-11-2008 , 18:37   Re: Uninamer (Unicode name changer)
Reply With Quote #5

Quote:
Originally Posted by pRED* View Post
There's no point in looping the full length of the string.

The last character of the name will be followed by a null terminator which has the integer value 0 or char value '\0'

So you can loop

Code:
while (num = nameBuf[i++])
{
        if (num>160)
        {
            uni=true;
        }
}
or similar.
thats not a real performance issue thus linear memory access is not that expensive. but i'll look for that. i am planing a next version which is somehow more advanced in its behavior which will include a check for the string terminator. this first pre-release was just something like a feasibility study.
red! is offline