Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| A correct syntax would be something like
| 
| LString LString::discardSign() const
| {
|       LString tmp = this;
|         for (int i=0; i<length(); i++)
|                 tmp[i] &= 0x7f;
|         return tmp;
| }
| 
| Which would be used as
|  name = name.discardSign();

And even better would be a function that does not clutter up LString
anymore:

LString discardSign(LString const & str)
{
        LString tmp(str);
        for (int i = 0; i < tmp.length(); ++i) 
                tmp[i] &= 0x7f;
        return tmp;
}

        Lgb

Reply via email to