Reported by Timo Lindfors <timo.lindfors@iki.fi>
java/util/regex/Matcher.java (lookingAt): Set position when match
found.
(matches): Implemented through lookingAt().
2005-02-07 Mark Wielaard <mark@klomp.org>
Fix suggested by Timo Lindfors <timo.lindfors@iki.fi>
* java/util/regex/Pattern.java (split(CharSequence,int)):
Fix while empties > 0 loops.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94713
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-02-07 Mark Wielaard <mark@klomp.org>
+
+ Reported by Timo Lindfors <timo.lindfors@iki.fi>
+ java/util/regex/Matcher.java (lookingAt): Set position when match
+ found.
+ (matches): Implemented through lookingAt().
+
+2005-02-07 Mark Wielaard <mark@klomp.org>
+
+ Fix suggested by Timo Lindfors <timo.lindfors@iki.fi>
+ * java/util/regex/Pattern.java (split(CharSequence,int)):
+ Fix while empties > 0 loops.
+
2005-02-07 Robert Schuster <thebohemian@gmx.net>
* gnu/java/nio/charset/ISO_8859_1.java,
if (match != null)
{
if (match.getStartIndex() == 0)
- return true;
+ {
+ position = match.getEndIndex();
+ return true;
+ }
match = null;
}
return false;
*/
public boolean matches ()
{
- return find(0);
+ if (lookingAt())
+ {
+ if (position == input.length())
+ return true;
+ match = null;
+ }
+ return false;
}
/**
empties++;
else
{
- while (empties-- > 0)
- list.add("");
+ while (empties > 0)
+ {
+ list.add("");
+ empties--;
+ }
String text = input.subSequence(start, end).toString();
list.add(text);
int max = limit - list.size();
empties = (empties > max) ? max : empties;
}
- while (empties-- > 0)
- list.add("");
+ while (empties > 0)
+ {
+ list.add("");
+ empties--;
+ }
}
// last token at end