CharSet Tool - minor bug

More
5 years 11 months ago #2999 by studenman
The code that removes the [i2***] specialization and plural tags is not properly removing the last ] from the string. I believe the code should be changed to:
        string RemoveTagsPrefix(string text, string tagPrefix)
        {
            int idx = 0;
            while (idx < text.Length)
            {
                idx = text.IndexOf(tagPrefix);
                if (idx < 0)
                    break;

                int idx2 = text.IndexOf(']', idx);
                if (idx2 < 0)
                    break;

                text = text.Remove(idx, idx2 - idx + 1);
            }
            return text;
        }

Changed: text = text.Remove(idx, idx2 - idx + 1);

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #3000 by Frank
Replied by Frank on topic CharSet Tool - minor bug
Thanks for looking into that!
You are right, I just made the change,
THANKS!

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.136 seconds
Template by JoomlaShine