开发者

While loop doesn't work in Android but works in a normal Java class?

Hi I am having a problem with 开发者_JAVA百科my while loop in the getAmatch() function

It doesn't enter the while loop in android but enters in a normal Java class.


All I can say off the top of my head without a bit more information is watch your case sensitivity on both input and patterns, and your while loop is a good piece of evidence; your matcher.find() is simply not finding a match. As it states in the documentation:

Parameters:

start: The index in the input at which the find operation is to begin. If this is less than the start of the region, it is automatically adjusted to that value. If it is beyond the end of the region, the method will fail.

Returns:

true if (and only if)** a match has been found.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜