本文整理了Java中java.util.regex.Matcher.regionEnd()
方法的一些代码示例,展示了Matcher.regionEnd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matcher.regionEnd()
方法的具体详情如下:
包路径:java.util.regex.Matcher
类名称:Matcher
方法名:regionEnd
[英]Holds the end of the region, or input.length() if the matching should go until the end of the input.
[中]
代码示例来源:origin: osmandapp/Osmand
/**
* Skip over any whitespace so that the matcher region starts at the next
* token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: com.google.protobuf/protobuf-java
/**
* Skip over any whitespace so that the matcher region starts at the next
* token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: nutzam/nutz
/**
* 显示 Matcher 的详细信息
*
* @param m
* Matcher 对象,必须执行过 find
* @return 信息
*/
public static String matcherFound(Matcher m) {
StringBuilder sb = new StringBuilder();
sb.append(String.format("%d/%d Regin:%d/%d\n",
m.start(),
m.end(),
m.regionStart(),
m.regionEnd()));
for (int i = 0; i <= m.groupCount(); i++)
sb.append(String.format("%2d:[%3d,%3d) %s\n", i, m.start(i), m.end(i), m.group(i)));
return sb.toString();
}
代码示例来源:origin: robovm/robovm
/**
* Returns a string representing this {@code Matcher}.
* The format of this string is unspecified.
*/
@Override public String toString() {
return getClass().getName() + "[pattern=" + pattern() +
" region=" + regionStart() + "," + regionEnd() +
" lastmatch=" + (matchFound ? group() : "") + "]";
}
代码示例来源:origin: osmandapp/Osmand
if (matcher.regionStart() == matcher.regionEnd()) {
if (matcher.lookingAt()) {
currentToken = matcher.group();
matcher.region(matcher.end(), matcher.regionEnd());
} else {
matcher.region(pos + 1, matcher.regionEnd());
代码示例来源:origin: square/javapoet
addArgument(format, formatChar, arguments.get(argumentName));
formatParts.add("$" + formatChar);
p += matcher.regionEnd();
} else {
checkArgument(p < format.length() - 1, "dangling $ at end");
代码示例来源:origin: com.google.protobuf/protobuf-java
if (matcher.regionStart() == matcher.regionEnd()) {
if (matcher.lookingAt()) {
currentToken = matcher.group();
matcher.region(matcher.end(), matcher.regionEnd());
} else {
matcher.region(pos + 1, matcher.regionEnd());
代码示例来源:origin: ltsopensource/light-task-scheduler
Strategy currentStrategy = getStrategy(currentFormatField, definingCalendar);
for (; ; ) {
patternMatcher.region(patternMatcher.end(), patternMatcher.regionEnd());
if (!patternMatcher.lookingAt()) {
nextStrategy = null;
currentStrategy = nextStrategy;
if (patternMatcher.regionStart() != patternMatcher.regionEnd()) {
throw new IllegalArgumentException("Failed to parse \"" + pattern + "\" ; gave up at index " + patternMatcher.regionStart());
代码示例来源:origin: ltsopensource/light-task-scheduler
Strategy currentStrategy = getStrategy(currentFormatField, definingCalendar);
for (; ; ) {
patternMatcher.region(patternMatcher.end(), patternMatcher.regionEnd());
if (!patternMatcher.lookingAt()) {
nextStrategy = null;
currentStrategy = nextStrategy;
if (patternMatcher.regionStart() != patternMatcher.regionEnd()) {
throw new IllegalArgumentException("Failed to parse \"" + pattern + "\" ; gave up at index " + patternMatcher.regionStart());
代码示例来源:origin: jphp-group/jphp
@FastMethod
@Signature
public Memory regionEnd(Environment env, Memory... args) {
return LongMemory.valueOf(matcher.regionEnd());
}
代码示例来源:origin: palantir/atlasdb
/**
* Skip over any whitespace so that the matcher region starts at the next token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: palantir/atlasdb
if (matcher.regionStart() == matcher.regionEnd()) {
if (matcher.lookingAt()) {
currentToken = matcher.group();
matcher.region(matcher.end(), matcher.regionEnd());
} else {
matcher.region(pos + 1, matcher.regionEnd());
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private boolean replace(Version newVersion, String content, Matcher m, File target) throws IOException {
StringBuilder output = new StringBuilder();
output.append(content, 0, m.start(1));
output.append(newVersion);
output.append(content, m.end(1), m.regionEnd());
IO.store(output, target);
return true;
}
代码示例来源:origin: org.apache.activemq/activemq-all
/**
* Skip over any whitespace so that the matcher region starts at the next
* token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
/**
* Skip over any whitespace so that the matcher region starts at the next
* token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: com.googlecode.protobuf-java-format/protobuf-java-format
/**
* Skip over any whitespace so that the matcher region starts at the next token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: com.googlecode.protobuf-java-format/protobuf-java-format
/**
* Skip over any whitespace so that the matcher region starts at the next
* token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: com.googlecode.protobuf-java-format/protobuf-java-format
/**
* Skip over any whitespace so that the matcher region starts at the next token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: com.palantir.atlasdb/atlasdb-server
/**
* Skip over any whitespace so that the matcher region starts at the next token.
*/
private void skipWhitespace() {
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(), matcher.regionEnd());
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Returns a string representing this {@code Matcher}.
* The format of this string is unspecified.
*/
@Override public String toString() {
return getClass().getName() + "[pattern=" + pattern() +
" region=" + regionStart() + "," + regionEnd() +
" lastmatch=" + (matchFound ? group() : "") + "]";
}
内容来源于网络,如有侵权,请联系作者删除!