Removes all characters from the given string whirh are NOT a number, '.' or ':'. Returns true if any change was done to the input text.
256 {
257 bool was_text_changed = false;
258 int length = potential_ip.Length();
259
260
261 for (int i = length - 1 ; i >= 0; --i)
262 {
263 string character = potential_ip.Get(i);
264
265 if (character.
ToInt() == 0 && character !=
"0" && character !=
"." && character !=
":")
266 {
267 potential_ip = potential_ip.SubstringInverted(potential_ip, i, i + 1);
268 was_text_changed = true;
269 }
270 }
271
273
274 return (was_text_changed || text_was_shortened);
275 }
proto native int ToInt()
Converts string to integer.