Welcome, Guest
Username: Password: Remember me

TOPIC: CharSet Tool - minor bug

CharSet Tool - minor bug 2 weeks 5 days ago #2999

  • studenman
  • studenman's Avatar
  • Offline
  • Senior Member
  • Posts: 50
  • Thank you received: 1
  • Karma: 1
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);
The administrator has disabled public write access.

CharSet Tool - minor bug 2 weeks 5 days ago #3000

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1059
  • Thank you received: 229
  • Karma: 66
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
The administrator has disabled public write access.
Time to create page: 0.210 seconds
Colors